Services/Sync/Developer/StorageFormat: Difference between revisions

From MozillaWiki
< Services‎ | Sync
Jump to navigation Jump to search
Line 3: Line 3:
= Weave Basic Object =
= Weave Basic Object =


All records from the server come back as a JSON string that represent a JS-object with some attributes. The whole object is described by the [[https://wiki.mozilla.org/Labs/Weave/API|Sync Server API]], but for a given client storage version, only a subset may be used.
All records from the server come back as a JSON string that represent a JS-object with some attributes. The whole object is described by the [[Labs/Weave/API|Sync Server API]], but for a given client storage version, only a subset may be used.


== Version 2 ==
== Version 2 ==

Revision as of 19:50, 29 March 2010

Under a user's /storage path, there's a set of well-known records and storage formats used by the Weave Sync add-on. This document describes those records and their formats, e.g., JS-object format of the JSON-string payload.

Weave Basic Object

All records from the server come back as a JSON string that represent a JS-object with some attributes. The whole object is described by the Sync Server API, but for a given client storage version, only a subset may be used.

Version 2

Changes from v1 -> v2

Version 1

Payload: Encrypted Data Object

Individual data engines, e.g., bookmarks, encrypt their BrowserObjects payloads before packing it into the payload field of a Weave Basic Object. There is additional metadata about the encryption to help decrypt the BrowserObject payload.

Version 2

Changes from v1 -> v2

Version 1

Payload: meta/global

The payload of the meta/global record contains general metadata to describe data like versions and syncID.

Version 2

storageVersion int:
syncID string:
engines object:

Changes from v1 -> v2

Version 1

storageVersion string:
syncID string:

Payload: keys/pubkey

Version 2

Changes from v1 -> v2

No changes.

Version 1

Payload: keys/privkey

Version 2

Changes from v1 -> v2

No changes.

Version 1

Payload: crypto/<engine>

Version 2

Changes from v1 -> v2

Version 1