Django

Code

Ticket #7540: minus4json.diff

File minus4json.diff, 0.7 kB (added by kenichi.ueda@gmail.com, 5 months ago)

Tiny fix to JSON-recognizing regex

  • django/contrib/gis/gdal/geometries.py

    old new  
    6262# Regular expressions for recognizing HEXEWKB and WKT. 
    6363hex_regex = re.compile(r'^[0-9A-F]+$', re.I) 
    6464wkt_regex = re.compile(r'^(?P<type>POINT|LINESTRING|LINEARRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)[ACEGIMLONPSRUTY\d,\.\-\(\) ]+$', re.I) 
    65 json_regex = re.compile(r'^\{[\s\w,\.\"\'\:\[\]]+\}$') 
     65json_regex = re.compile(r'^\{[\s\w,\-\.\"\'\:\[\]]+\}$') 
    6666 
    6767#### OGRGeometry Class #### 
    6868class OGRGeometry(object):