How can i use the package to validate if some file is geojson and not normal json (without geometric types included)?
What Im currently doing is:
import geojson
def is_geojson(path):
data = None
with open(path) as fp:
try:
data = geojson.load(fp)
print(data)
except Exception as exc:
print('Exception during geojson validation: ', exc)
return bool(data)
return False
In this way every normal json file is recognized as geojson. Please let me know!
Hi!
How can i use the package to validate if some file is geojson and not normal json (without geometric types included)? What Im currently doing is:
In this way every normal json file is recognized as geojson. Please let me know!
Thank you!