perkeep/doc/schema/blob-magic.txt

27 lines
876 B
Plaintext
Raw Normal View History

2010-06-12 00:44:44 +00:00
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Camli Blob Magic
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[Note: not totally happy with this yet...]
2010-12-30 18:17:47 +00:00
2010-06-12 00:44:44 +00:00
Ideal Camli JSON blobs should begin with the following 15 bytes:
2010-11-05 04:06:52 +00:00
{"camliVersion"
2010-06-12 00:44:44 +00:00
However, it's acknowledged that some JSON serialization libraries will
format things differently, so additional whitespace should be
tolerated.
2010-12-30 18:17:47 +00:00
An ideal camli serializer will strive for the above header, though, by
doing something like:
-- removing the "camliVersion" from the object, noting its value
(and requiring it to be present)
-- serializing the JSON with an existing JSON serialization library,
-- removing the serialized JSON's leading "{" character and prepending
the 15 byte header above, as well as the colon and saved version
and comma (which can have whitespace as desired)
2010-06-12 00:44:44 +00:00