garyburd/go-mongo — pull request #9 by njalali (2013-01-13 12:26:43+00:00)
Title: Implemented Marshaler Interface on ObjectId

By implementing the Marshaler interface (one function MarshalJSON), you no longer have to worry about converting the objectId to a string before calling json.Marshal

http://golang.org/pkg/encoding/json/#Marshaler