If simplejson is installed, Flask will autodetect it and use it for JSON
serialization. This is necessary because the lat/lon are returned from
the database as decimal objects, which are not able to be serialized by
the stdlib JSON serializer. I guess these are things you learn as you
get better at python. If I had to do it over again, I'd make the lat/lon
fields floats instead, which seems to Just Work™.
If simplejson is installed, Flask will autodetect it and use it for JSON serialization. This is necessary because the lat/lon are returned from the database as decimal objects, which are not able to be serialized by the stdlib JSON serializer. I guess these are things you learn as you get better at python. If I had to do it over again, I'd make the lat/lon fields floats instead, which seems to Just Work™.