chatfed_whisp / utils /utils.py
leavoigt's picture
move geojson function to utils
e93edee
raw
history blame
237 Bytes
import json
def process_geojson(file):
if file is None:
return {}
try:
with open(file, 'r', encoding='utf-8') as f:
return json.load(f)
except Exception as e:
return {"error": str(e)}