资 源 简 介
MongrelJSON
Overview
The Erlang MongoDB driver encapsulates a MongoDB document as a tuple where the keys of the documents are atoms and the values are encoded as binaries, atoms, lists, integers, floats or tuples (where the tuple implicitly or explicitly encodes the type of the value, e.g. nested document, object ID, date, etc). The encoding scheme is Erlang-centric and makes for easy-to-read Erlang code but suffers from the problem that the representation of a document is not suitable for parsing by other libraries like mochijson or by code not written in Erlang.
MongrelJSON is a small (one module) library that provides two functions for:
1. Converting a driver representation of a MongoDB document to the JSON format used by the mongoexport and mongoimport tools.
1. Converting from the JSON format used by the mongoexport and