Created
April 3, 2011 00:04
-
-
Save erichocean/900030 to your computer and use it in GitHub Desktop.
A standardized JSON changeset format for SproutCore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Changeset v2 format | |
| { | |
| "sc_version": 2, // I guess we should start versioning if I'm going to change it ;) | |
| "sc_types": ["Foo", "Bar"], | |
| // TODO: Should we include Namespace information as well? | |
| "Foo": { | |
| "created": [ | |
| "<primaryKey>" | |
| // ... more created record ids of type "Foo" | |
| ], | |
| "updated": [ | |
| "<primaryKey>" | |
| // ... more update record ids of type "Foo" | |
| ], | |
| "deleted": [ | |
| "<primaryKey" | |
| // ...more deleted record ids of type "Foo" | |
| ], | |
| "attributes": { | |
| "<primaryKey>": { | |
| // attributes hash keys and values | |
| } | |
| // ... more attribute hashes for records of type "Foo" | |
| } | |
| }, | |
| "Bar": { | |
| "created": [ | |
| "<primaryKey>" | |
| // ... more created record ids of type "Bar" | |
| ], | |
| "updated": [ | |
| "<primaryKey>" | |
| // ... more update record ids of type "Bar" | |
| ], | |
| "deleted": [ | |
| "<primaryKey" | |
| // ...more deleted record ids of type "Bar" | |
| ], | |
| "attributes": { | |
| "<primaryKey>": { | |
| // attributes hash keys and values | |
| } | |
| // ... more attribute hashes for records of type "Bar" | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment