EJSON
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
EJSON is a backward-compatible extension to JSON that adds Date and Binary types.
Examples
> EJSON.stringify({ when: new Date }) "{"when":{"$date":1412884295442}}" > EJSON.stringify({ imageData: new Uint8Array(10) }) "{"imageData":{"$binary":"AAAAAAAAAAAAAA=="}}" > EJSON.stringify({$date: "something"}) "{"$escape":{"$date":"something"}}" > EJSON.stringify({_id: new Mongo.ObjectID}) "{"_id":{"$type":"oid","$value":"34c420c028fb169c31041ab0"}}"