Tag Archive: json

Feb 07

Exporting MongoMapper Objects to JSON

I wanted to export a MongoMapper document and it’s related documents as JSON — with embedded arrays for the collections. Invoking to_json did not seem to work perfectly, so I set about to discover what was going on. Conclusion If you use Embedded Documents for every associated document, the to_json method will work perfectly. If …

Continue reading »