Skip to content

Instantly share code, notes, and snippets.

@geraintluff
Created January 30, 2013 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geraintluff/4672681 to your computer and use it in GitHub Desktop.
Save geraintluff/4672681 to your computer and use it in GitHub Desktop.
{
"responseStatus": {
"status": "success",
"message": "This is a valid message"
},
"data": {
"total": 2,
"collection": [
{
"id": 1,
"name": "Folder",
"type": "folder",
"children": [
{
"id": 22,
"name": "File",
"type": "file",
"children": []
}
]
},
{
"id": 2,
"name": "File b",
"type": "file",
"children": [
{
"id": 8,
"name": "File b",
"type": "file",
"children": []
}
]
}
]
}
}
{
"type": "object",
"properties": {
"data": {
"type": "object",
"id": "#data",
"required": [
"collection",
"total"
],
"properties": {
"total": {
"type": "number",
"id": "#total",
"minimum": 0
},
"collection": {
"type": "array",
"id": "#collection",
"items": {
"type": "object",
"id": "#node",
"required": [
"id",
"name",
"type"
],
"properties": {
"id": {
"type": "number",
"id": "#id",
"minimum": 0
},
"name": {
"type": "string",
"id": "#name"
},
"type": {
"type": "string",
"id": "#type"
},
"children": {
"type": "array",
"items": {
"$ref": "#node"
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment