Created
May 9, 2014 16:55
-
-
Save borlaym/e1bb30b3b661fd390058 to your computer and use it in GitHub Desktop.
Sample JSON with schema
This file contains 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
{ | |
"_contents": { | |
"foo": "as", | |
"coll": [{ | |
"_id": "422229c393c04778e27b2f741462de29", | |
"meow": false | |
}, { | |
"_id": "bd9c8df15ebbac93cdade595aaf958c2", | |
"meow": false | |
}, { | |
"_id": "757ad49419763de2d35344e3f8044317", | |
"meow": false | |
}, { | |
"_id": "9adadb5eb777e6b0ac3d910a022acfad", | |
"meow": false | |
}, { | |
"_id": "68cc8a7a13557efc84c11ae094a43639", | |
"_createdDate": 1399550827405, | |
"_modifiedDate": 1399550845916, | |
"meow": 3 | |
}, { | |
"_id": "683ffdd6ac61588e9b48858881e05bbe", | |
"_createdDate": 1399551588992, | |
"_modifiedDate": 1399553642230, | |
"aedasda": [{ | |
"_id": "2ff83c10aa72f7190d7fc15d1a8c0831", | |
"_createdDate": 1399551588992, | |
"_modifiedDate": 1399553642230, | |
"foo": 0, | |
"foor": 3, | |
"foosr": 1 | |
}], | |
"foor": 3, | |
"foosr": 1 | |
}], | |
"boolean": false, | |
"number": 11, | |
"sample": { | |
"property": "foo", | |
"foo": { | |
"id": 2, | |
"marci": { | |
"meow": false | |
} | |
} | |
}, | |
"extra": {}, | |
"meow": 3, | |
"aedasda": 3 | |
}, | |
"_schema": { | |
"root": { | |
"coll": { | |
"type": "collection", | |
"schema": "marciObject", | |
"auth": { | |
"admin": "crud" | |
} | |
}, | |
"foo": { | |
"type": "string", | |
"default": "This is the default value.", | |
"validation": ["min:2", "max:5"] | |
}, | |
"boolean": { | |
"type": "boolean", | |
"default": false, | |
"validation": [] | |
}, | |
"number": { | |
"type": "number", | |
"default": 5, | |
"validation": ["min:10"] | |
}, | |
"sample": { | |
"type": "object", | |
"schema": "sample" | |
}, | |
"extra": { | |
"type": "object" | |
} | |
}, | |
"sample": { | |
"property": { | |
"type": "string" | |
}, | |
"foo": { | |
"type": "object", | |
"schema": "fooObject" | |
} | |
}, | |
"fooObject": { | |
"id": { | |
"type": "number" | |
}, | |
"marci": { | |
"type": "object", | |
"schema": "marciObject" | |
} | |
}, | |
"marciObject": { | |
"meow": { | |
"type": "boolean", | |
"auth": { | |
"admin": "cru" | |
} | |
} | |
} | |
}, | |
"extra": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment