mvanwoerkom (2) [Avatar] Offline
#1
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 json.org 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 json.org 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.