json/schema: add object test cases

This commit is contained in:
Danny Robson 2018-07-09 14:11:58 +10:00
parent 04249a8320
commit 8ea762bff8
27 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1 @@
0001-empty.input.json

View File

@ -0,0 +1 @@
{"foo":"bar"}

View File

@ -0,0 +1 @@
0002-keyval.input.json

View File

@ -0,0 +1 @@
{"array":[]}

View File

@ -0,0 +1 @@
0003-array.input.json

View File

@ -0,0 +1 @@
{"object":{}}

View File

@ -0,0 +1 @@
0004-object.input.json

View File

@ -0,0 +1 @@
{"type": "object"}

View File

@ -0,0 +1 @@
{ "string": 1 }

View File

@ -0,0 +1 @@
{ "number": {}}

View File

@ -0,0 +1 @@
{ "object": []}

View File

@ -0,0 +1 @@
{ "array": {} }

View File

@ -0,0 +1 @@
{ "boolean": 0 }

View File

@ -0,0 +1 @@
{ "null": 0 }

View File

@ -0,0 +1 @@
{ "string": "value" }

View File

@ -0,0 +1 @@
{ "number": 42 }

View File

@ -0,0 +1 @@
{ "object": {} }

View File

@ -0,0 +1 @@
{ "array": [] }

View File

@ -0,0 +1 @@
{ "boolean": false }

View File

@ -0,0 +1 @@
{ "boolean": true }

View File

@ -0,0 +1 @@
{ "null": null }

View File

@ -0,0 +1,8 @@
{ "properties": {
"string": { "type": "string" },
"number": { "type": "number" },
"object": { "type": "object" },
"array": { "type": "array" },
"boolean": { "type": "boolean" },
"null": { "type": "null" }
} }

View File

@ -0,0 +1 @@
{ "string": "foo" }

View File

@ -0,0 +1 @@
{ "string": "value" }

View File

@ -0,0 +1,9 @@
{
"type": "object",
"properties": {
"string": {
"type": "string",
"default": "value"
}
}
}