kpawlik/geojson — pull request #2 by mapmeld (2014-07-26 05:04:36+00:00)
Title: Add generic omitempty to all omitempty fields

I'm using this library with the MongoDB driver "mgo". It has a function similar to json.Marshal which converts GeoJSON objects, but it doesn't follow "json: omitempty" on fields. So this is adding bbox: null and crs: null to all queries, and then my GeoJSON is not valid in MongoDB.

I was able to fix my code by adding "$field, omitempty" to all fields where "json: omitempty" is currently used. I ran ```go test``` and all tests pass.