Does someone have a link to the storage format? I'm always curious and want to learn efficient encodings. Thanks!
Standards People.
It expects input of the form:
{
"add": {document 1 goes here},
"add": {document 2 goes here},
...
"commit": {}
}
And of course all the "add" values are different and the "commit" has to come at the end. <Hotel id="1">
<Amenity>Bacon</Amenity>
</Hotel>
turns into {'Hotel': {'@id': '1',
'Amenity': 'Bacon'}}
Straight forward enough. But here's what happens when you have two <Amenity> elements: <Hotel id="1">
<Amenity>Bacon</Amenity>
<Amenity>Chocolate</Amenity>
</Hotel>
Now turns into: {'Hotel': {'@id': '1',
'AmenitysList': {'@size': 2,
'Amenitys':
[{'Amenity': Bacon'}
{'Amenity': Bacon'}]}}}
The translation engine appears to have no knowledge of the schema, it just adds ___List and ___s entries. So the schema of the JSON is different based on the presence of a repeated elementAlso since it doesn't have any knowledge of the schema, all elements are textual except the special @size element.
Because @size is a special element for these lists (which of course you have no need for in JSON), but the engine turns XML attributes into @____ as well, there is no way to get at the actual "size" attribute if one exists.
It has a reasonably decent (highly decent for a header file) description.
One thing I had to take a guess at is that, in JEntry, the header is a combination of a bit mask and an offset. I also would guess that offsets for identical keys (can happen in nested json), and maybe offsets for other identical data will be identical. I didn't check either.
tl;dr storing json in a way that doesn't mean repeatedly parsing it to make updates