mvanwoerkom (2) [Avatar] Offline
quote: "In JavaScript, JSON objects are the obvious choice, .."

AFAIK JavaScript has JavaScript objects, there is no JSON object type.
The objects defined by the definition are isomorphic to a proper subset of JavaScript objects.

Forgive me if I am too strict or plain wrong. smilie

quote " .. since JSON is a document data structure;.."

I don't get the sense here. Why does that property matter?

My reasoning would more go along the line that well formed JSON objects (according to the definition) can be represented by native JavaScript objects.

Or even: Mongo DB documents and queries etc are on purpose designed to map to JavaScript objects.