Data
MongoDB Document JSON Example
A real-world JSON example of a MongoDB document — ObjectId, embedded sub-documents, and an array of references. Copy-ready for schema design and seed data in MongoDB collections.
Field Reference
_idrequiredObjectIdMongoDB's default 12-byte primary key, encoding a timestamp, machine identifier, and counter — auto-generated unless you supply your ownaddressoptionalobjectAn embedded sub-document — stored inline with the parent, not a separate collection, which is idiomatic MongoDB for one-to-one 'belongs entirely to this document' dataorderIdsoptionalarrayReferences to documents in a separate 'orders' collection by ObjectId — MongoDB's equivalent of a foreign key, resolved manually or via $lookup aggregation__voptionalnumberMongoose's internal version key used for optimistic concurrency control on array modifications — not part of MongoDB itself, only present when using the Mongoose ODMVariants
Extended JSON (Canonical)MongoDB's canonical Extended JSON format, used by mongoexport and driver debug output — every BSON type is explicit, unlike the relaxed form shown above.
Common Use Cases
- →Designing embedded vs. referenced document schemas before writing Mongoose/PyMongo models
- →Seeding a local MongoDB instance with realistic fixture documents
- →Understanding Extended JSON output when debugging mongoexport or driver logs
mongodbdocumentnosqldatabaseObjectId
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.