dewski/json_builder — pull request #33 by AhmadSherif (2012-08-12 12:40:17+00:00)
Title: Adding Moped::BSON::ObjectId to extensions to properly handle Mongoid 3.0.0+ documents ids

... otherwise, you are forced to call to_s on the document id to avoid a JSON::ParseError exception.