aboutsummaryrefslogtreecommitdiff
path: root/samples/JSON
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2012-07-24 11:12:33 -0500
committerJoshua Peek <josh@joshpeek.com>2012-07-24 11:12:33 -0500
commitbe1340bafc428e35e73461a534607d9cf70e01e3 (patch)
treecbb497e59f8ef376aa1f6d306b7af57f7a5854ef /samples/JSON
parent9777798cf7840848db7d34473bdc4b5018f70b41 (diff)
Add a few more json samples
Diffstat (limited to 'samples/JSON')
-rw-r--r--samples/JSON/person.json23
-rw-r--r--samples/JSON/product.json7
-rw-r--r--samples/JSON/schema.json47
3 files changed, 77 insertions, 0 deletions
diff --git a/samples/JSON/person.json b/samples/JSON/person.json
new file mode 100644
index 0000000..2624199
--- /dev/null
+++ b/samples/JSON/person.json
@@ -0,0 +1,23 @@
+{
+ "firstName": "John",
+ "lastName" : "Smith",
+ "age" : 25,
+ "address" :
+ {
+ "streetAddress": "21 2nd Street",
+ "city" : "New York",
+ "state" : "NY",
+ "postalCode" : "10021"
+ },
+ "phoneNumber":
+ [
+ {
+ "type" : "home",
+ "number": "212 555-1234"
+ },
+ {
+ "type" : "fax",
+ "number": "646 555-4567"
+ }
+ ]
+ } \ No newline at end of file
diff --git a/samples/JSON/product.json b/samples/JSON/product.json
new file mode 100644
index 0000000..2d5611a
--- /dev/null
+++ b/samples/JSON/product.json
@@ -0,0 +1,7 @@
+{
+ "id": 1,
+ "name": "Foo",
+ "price": 123,
+ "tags": ["Bar","Eek"],
+ "stock": { "warehouse":300, "retail":20 }
+} \ No newline at end of file
diff --git a/samples/JSON/schema.json b/samples/JSON/schema.json
new file mode 100644
index 0000000..ee580cc
--- /dev/null
+++ b/samples/JSON/schema.json
@@ -0,0 +1,47 @@
+{
+ "name":"Product",
+ "properties":
+ {
+ "id":
+ {
+ "type":"number",
+ "description":"Product identifier",
+ "required":true
+ },
+ "name":
+ {
+ "type":"string",
+ "description":"Name of the product",
+ "required":true
+ },
+ "price":
+ {
+ "type":"number",
+ "minimum":0,
+ "required":true
+ },
+ "tags":
+ {
+ "type":"array",
+ "items":
+ {
+ "type":"string"
+ }
+ },
+ "stock":
+ {
+ "type":"object",
+ "properties":
+ {
+ "warehouse":
+ {
+ "type":"number"
+ },
+ "retail":
+ {
+ "type":"number"
+ }
+ }
+ }
+ }
+} \ No newline at end of file