EJSON

EJSON

[1] meteor/DDP.md at devel · meteor/meteor () <https://github.com/meteor/meteor/blob/devel/packages/ddp/DDP.md#user-content-appendix-ejson>

EJSON is a way of embedding more than the built-in JSON types in JSON. It supports all types built into JSON as plain JSON, plus the following:

[2] specs/ipld at master · ipld/specs () <https://github.com/ipld/specs/tree/master/ipld>

On the subject of integers, there exist a variety of formats which represent integers as strings in JSON, for example, EJSON. These can be used and conversion to and from other formats should happen naturally-- that is, when converting JSON to CBOR, an EJSON integer should be transformed naturally to a proper CBOR integer, instead of representing it as a map with string values.

[3] EJSON | Meteor API Docs () <https://docs.meteor.com/api/ejson.html>

EJSON is an extension of JSON to support more types. It supports all JSON-safe types, as well as:

Date (JavaScript Date)

Binary (JavaScript Uint8Array or the result of EJSON.newBinary)

User-defined types (see EJSON.addType. For example, Mongo.ObjectID is implemented this way.)

All EJSON serializations are also valid JSON.