* ui_ux: => 0
* easy: => 0
Comment:
What about actually attempting to decode the JSON (json.loads) and catch
the ValueError when it is not valid?
{{{
def is_json(geom_input):
try:
json.loads(geom_input)
return True
except ValueError:
return Fals
}}}
The major downside is that we are loading a (potentially large) GeoJSON
object that will never be used. The regex is fast, but has corner cases.
--
Ticket URL: <https://code.djangoproject.com/ticket/15529#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_tests: 1 => 0
Comment:
Just uploaded a patch with a test, if we want to keep going the regex
route.
--
Ticket URL: <https://code.djangoproject.com/ticket/15529#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"c64efe37345cc632e24beb8c7e2a81ef5d3713ba"]:
{{{
#!CommitTicketReference repository=""
revision="c64efe37345cc632e24beb8c7e2a81ef5d3713ba"
Fixed #15529 -- More permissive geojson syntax in constructor
Thanks Wouter Klein Heerenbrink for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/15529#comment:8>