serpy
serpy copied to clipboard
Django GeoJSON / Geometry fields.
Is there a way to get these to work? I've had ago but it doesn't seem to like them being treated as JSON fields.
I get the following message:
"Object of type 'Point' is not JSON serializable"
Hi @jackdh. I had the same requirement as you and have started implementing this in serpy here: https://github.com/stuart23/serpy/tree/stuart23-GeoJSON_serializer
Currently it will output a GeoJSON when using the GeoJSONserializer, but will only serialize PointFields. I will be adding more of the geometry types soon.