Open jbee opened 13 years ago
How does object look like ?
.type
field1
field2
parent..type
parent.field1
parent.field2
parent.child1..type
parent.child1.field1
parent.child1.field2
parent.child2..type
parent.child2.field1
parent.child2.field2
.type
describes the kind of value represented at the level in the hierarchy by a class Type
having 3 values:
class
of the value
Everything can be stored in a single set/list of property-value pairs. They have to contain additional non-value entries for objects to keep their type information. Those are stored as 'hidden' using property names starting with a
.
(which will not be allowed for names of normal properties). Beside the type of the object a path represents they will also contain the count of members. The sorting of the pairs will be in a way that this object identifier property is the first property followed by all its members (and their sub-values). So when this count is known, the object can be stripped out of a more complex one by simply find the object-identifier entry, read it length and construct a new data-object with the new path, start and end for binary search in that object.