Created
March 5, 2015 16:01
-
-
Save kerin/26a52bf3221e549380c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ShortGeoJSONEncoder(json.JSONEncoder): | |
| def default(self, obj): | |
| print 'GEOJSON' | |
| if type(obj) == float: | |
| #return float("{:.6f}".format(obj)) | |
| return 'FOO' | |
| else: | |
| return 'BAR' | |
| #return json.JSONEncoder.default(self, obj) | |
| print json.dumps(geojson, cls=ShortGeoJSONEncoder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment