diff --git a/arcgis/arcgis.py b/arcgis/arcgis.py index 905885d..25ac133 100644 --- a/arcgis/arcgis.py +++ b/arcgis/arcgis.py @@ -87,7 +87,7 @@ def get_json(self, layer, where="1 = 1", fields=[], count_only=False, srid='4326 'orderByFields': "OBJECTID", 'returnCountOnly': count_only }) - return response.json() + return response.json(strict=False) def get_descriptor_for_layer(self, layer): """ @@ -175,6 +175,14 @@ def getMultiple(self, layers, where="1 = 1", fields=[], srid='4326', layer_name_ 'features': features } + def validate_geojson(self, filename, data="geojson_query"): + good_request = requests.post("http://geojsonlint.com/validate", data).__str__() + if good_request == "": + f = open(filename, "w") + f.write(data) + f.close() + else: + print "The GeoJSON gathered from the specified layer is invalid." def urljoin(*args): """