![]() |
Home | Libraries | People | FAQ | More |
The JSON format is a data interchange format derived from the object literal notation of JavaScript. (JSON stands for JavaScript Object Notation.) JSON is a simple, compact format for loosely structured node trees of any depth, very similar to the property tree dataset. It is less structured than XML and has no schema support, but has the advantage of being simpler, smaller and typed without the need for a complex schema.
The property tree dataset is not typed, and does not support arrays as such. Thus, the following JSON / property tree mapping is used:
JSON round-trips, except for the type information loss.
For example this JSON:
{ "menu": { "foo": true, "bar": "true", "value": 102.3E+06, "popup": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, ] } }
will be translated into the following property tree:
menu { foo true bar true value 102.3E+06 popup { "" { value New onclick CreateNewDoc() } "" { value Open onclick OpenDoc() } } }