Load one synthetic document with four BSON types
Run this once in mongosh on a disposable MongoDB server with an empty practice collection.
db.getSiblingDB("keplergrid_types_lab").receipts.insertOne({
_id: "T-001",
quantity: NumberInt(7),
sequence: NumberLong("9007199254740993"),
amount: NumberDecimal("19.90"),
recordedAt: ISODate("2026-11-25T12:00:00Z")
})
Read the type wrappers in the inspector
Open keplergrid_types_lab.receipts in Documents. Run the filter below, select the returned row and choose Extended JSON in the document inspector. Use Toggle document inspector in the toolbar if needed.
{ "_id": "T-001" }
| Field | Canonical | Relaxed |
|---|---|---|
quantity | {"$numberInt":"7"} | 7 |
sequence | {"$numberLong":"9007199254740993"} | JSON number |
amount | {"$numberDecimal":"19.90"} | {"$numberDecimal":"19.90"} |
recordedAt | {"$date":{"$numberLong":"1795608000000"}} | {"$date":"2026-11-25T12:00:00Z"} |
Relaxed Extended JSON represents some BSON numbers as JSON numbers. A JavaScript parser can round an Int64 above its safe integer limit, so keep the Canonical wrapper when exchanging this sequence. The Canonical date stores milliseconds since the Unix epoch inside its date wrapper.
Export the current page as Canonical JSON Lines
- Use Export with the filter above still active. Select Current query page, then Canonical Extended JSON. Click Export documents.
- Open the
.jsonlfile in a text editor. It should contain one line, with the sequence preserved as the string"9007199254740993"inside$numberLong. - If you need every stored document instead, choose Entire collection. The collection export ignores the current filter, sort, projection, and page.
KeplerGrid’s Extended JSON export writes Canonical data. It is suitable for an Extended JSON Lines import into a practice collection, where you can verify the wrappers again.
See how to export every matching result or edit a Decimal128 field and verify its type.