Persistent Computing on the Web with JSON Schema and Referencing Kris Zyp
Overview JSON Referencing JSON Schema The possiblities...
JSON + Hyperlinks = JSON Referencing
JSON Referencing Cyclic Multiple references Cross-message references Cross-site references http://www.sitepen.com/blog/2008/06/17/json-referencing-in-dojo/
JSON Referencing (ID Based)‏ { “ name”:”Kris Zyp”, “ id”:”kriszyp”, “children”:[{“id”:”jennikazyp”,“name”:”Jennika Zyp”}], “ spouse”:{ “ name”:”Nicole Zyp”, “spouse”:{“$ref”:”kriszyp”}, “ children”:[{“$ref”:”jennikazyp”}] } }
JSON Referencing (Path Based)‏ { “ name”:”Kris Zyp”, “children”:[{“name”:”Jennika Zyp”}], “ spouse”:{ “ name”:”Nicole Zyp”, “spouse”:{“$ref”:”#”}, “ children”:{“$ref”:”#.children”} } }
JSON Referencing (ID + Path)‏ { “ name”:”Kris Zyp”, “ id”:”kriszyp”, “children”:[{“name”:”Jennika Zyp”}], “ friends”:[{“$ref”:”jesse#.spouse”}] }
JSON + Schema = JSON Schema
JSON Schema schema: {"description":"A person", "type":"object", "properties": {"name": {"type":"string"}, "age" : {"type":"integer", "maximum":125}} } instance: {“name”:”Kris”, “ age”:30}
JSON Schema Schema: {"description":"A person", "type":"object", "properties": {"name": {"type":"string"}, "age" : {"type":"integer", "maximum":125, “optional”:true},   “friends”: {“type”:”array”, “items”:{“type”:”object”}}   } } instance: {“name”:”Kris”, “ friends”:[{“name”:”Nikki”}] }
JSON Schema Schema: {“type”:”array”, “items”:[{“type”:”string”},{“type”:”number”}] } instance: [“foo”,44]
JSON Schema Schema: {"description":"A person", "type":["object",”string”] } instance: “ foo” instance: {“prop”:3}
JSON Schema Schema: {"description":"A person", "type":["object",”string”] } instance: “ foo” instance: {“prop”:3}
JSON Schema schema: {"description":"A person", "type":"object", "properties": {"name": {"type":"string"}, "gender" : {"type":"string", "enum”:[“male”,”female”]}}, “ additionalProperties”:false } instance: {“name”:”Kris”,  “ gender”:”male”}
What can we do with these?
JSON Schema + JSON Referencing {"description":"A Social Person",  “id”:”socialperson”, "type":"object", "properties": {"name": {"type":"string"}, "age" : { "type":"integer", "maximum":125 }, "friends" : { “ type” : ”array”, “ items” : {“$ref”:”socialperson”} } }, “ extends”:{“$ref”:”person”} }
JSON Referencing + REST Lazy loading - Generic clients can auto-load objects as necessary Object identification can be used for  saving state changes http://blog.medryx.org/2008/07/24/jsonreststore-overview/
JSON Referencing + REST GET /Person/3 { “ name”:”Kris”, “ friends”:[ {“$ref”:”4”}, {“$ref”:”5”} ] }
JSON Referencing + JSON-RPC POST /person/kriszyp { “ method”:”addFriend”, “ id”:”1”, “ params”:[{“$ref”:”jessesmith”}] }
Applying data definitions to code
JSON Schema + Typed Code
JSON Schema Interfaces
JSON Schema Interface {"description":"A person", "type":"object", "properties": {"name": {"type":"string"}  },  “methods”:{   “getName”:{“returns”:{“type”:”string”},   “params”:[]},   “setName”:{“params”:[{“type”:”string”}]},  } }
Cross-site Referencing { “ name”:”Kris Zyp”, “ id”:”kriszyp”, “ friends”:[ {“$ref”:” http://thezyps.com/person/nikki ”}, {“$ref”:” http://social.com/user/33 ”} ] }
Cross-site Typing
Mobile code (run anywhere)‏ Code can run anywhere Server JavaScript Environment Browser JavaScript Environment Consistent persisted data structures across environments
Connecting and structuring data for the future JSON Schema and JSON Referencing
 

More Related Content

PPTX
Schema Design
PPTX
SQL to JSON
PDF
JSON-LD: Linked Data for Web Apps
PDF
JSON-LD: JSON for the Social Web
PPTX
Webinar: Schema Design
PPTX
MongoDB San Francisco 2013: Schema design presented by Jason Zucchetto, Consu...
PDF
08. ElasticSearch : Sorting and Relevance
KEY
JSON-LD: JSON for Linked Data
Schema Design
SQL to JSON
JSON-LD: Linked Data for Web Apps
JSON-LD: JSON for the Social Web
Webinar: Schema Design
MongoDB San Francisco 2013: Schema design presented by Jason Zucchetto, Consu...
08. ElasticSearch : Sorting and Relevance
JSON-LD: JSON for Linked Data

What's hot (9)

KEY
JSON-LD and MongoDB
PPTX
JSON-LD for RESTful services
PDF
01 ElasticSearch : Getting Started
PDF
Hands on JSON
PPTX
Building Your First App with MongoDB
PDF
Introduction to Json ld
PDF
Linked Data in Use: Schema.org, JSON-LD and hypermedia APIs - Front in Bahia...
KEY
Devoxx - JSON Validation using JSON Schema and Jackson
PDF
Introduction to Elasticsearch
JSON-LD and MongoDB
JSON-LD for RESTful services
01 ElasticSearch : Getting Started
Hands on JSON
Building Your First App with MongoDB
Introduction to Json ld
Linked Data in Use: Schema.org, JSON-LD and hypermedia APIs - Front in Bahia...
Devoxx - JSON Validation using JSON Schema and Jackson
Introduction to Elasticsearch
Ad

Viewers also liked (6)

PPTX
Using JSON Schema Validator
PDF
JSON Schema: Your API's Secret Weapon
PPTX
Pragmatic REST APIs
PPTX
XML's validation - XML Schema
PDF
JSON Schema in Web Frontend #insideFE
PDF
Apache cassandra & apache spark for time series data
Using JSON Schema Validator
JSON Schema: Your API's Secret Weapon
Pragmatic REST APIs
XML's validation - XML Schema
JSON Schema in Web Frontend #insideFE
Apache cassandra & apache spark for time series data
Ad

Similar to JSON Referencing and Schema (20)

PPT
Java Script Based Client Server Webapps 2
PPT
Advanced Json
PPT
RESTful JSON web databases
PDF
Rc173 010d-json 2
PDF
Json at work overview and ecosystem-v2.0
PDF
LF_APIStrat17_Embracing JSON Schema
PPTX
Java and Mongo
PDF
JSON Application
PDF
JSON and JSON Schema in Oxygen
PDF
Using MongoDB as a high performance graph database
PDF
Create an Design JSON Schema
PDF
Intro to JSON
ZIP
The InfoGrid Graph DataBase
PPT
json.ppt download for free for college project
PDF
NoSQL for the rest of us - a JBoss perspective over those hot tools and how y...
PDF
OrientDB introduction - NoSQL
PPTX
Go之道
PDF
JSON Schema Design
PDF
NoSQL & JSON
PDF
Development without Constraint
Java Script Based Client Server Webapps 2
Advanced Json
RESTful JSON web databases
Rc173 010d-json 2
Json at work overview and ecosystem-v2.0
LF_APIStrat17_Embracing JSON Schema
Java and Mongo
JSON Application
JSON and JSON Schema in Oxygen
Using MongoDB as a high performance graph database
Create an Design JSON Schema
Intro to JSON
The InfoGrid Graph DataBase
json.ppt download for free for college project
NoSQL for the rest of us - a JBoss perspective over those hot tools and how y...
OrientDB introduction - NoSQL
Go之道
JSON Schema Design
NoSQL & JSON
Development without Constraint

Recently uploaded (20)

PDF
STKI Israel Market Study 2025 version august
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPT
What is a Computer? Input Devices /output devices
PPT
Geologic Time for studying geology for geologist
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Tartificialntelligence_presentation.pptx
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
STKI Israel Market Study 2025 version august
Chapter 5: Probability Theory and Statistics
Zenith AI: Advanced Artificial Intelligence
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Assigned Numbers - 2025 - Bluetooth® Document
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A review of recent deep learning applications in wood surface defect identifi...
What is a Computer? Input Devices /output devices
Geologic Time for studying geology for geologist
Taming the Chaos: How to Turn Unstructured Data into Decisions
Web Crawler for Trend Tracking Gen Z Insights.pptx
A comparative study of natural language inference in Swahili using monolingua...
Enhancing emotion recognition model for a student engagement use case through...
sustainability-14-14877-v2.pddhzftheheeeee
Hindi spoken digit analysis for native and non-native speakers
observCloud-Native Containerability and monitoring.pptx
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Tartificialntelligence_presentation.pptx
O2C Customer Invoices to Receipt V15A.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...

JSON Referencing and Schema

  • 1. Persistent Computing on the Web with JSON Schema and Referencing Kris Zyp
  • 2. Overview JSON Referencing JSON Schema The possiblities...
  • 3. JSON + Hyperlinks = JSON Referencing
  • 4. JSON Referencing Cyclic Multiple references Cross-message references Cross-site references http://www.sitepen.com/blog/2008/06/17/json-referencing-in-dojo/
  • 5. JSON Referencing (ID Based)‏ { “ name”:”Kris Zyp”, “ id”:”kriszyp”, “children”:[{“id”:”jennikazyp”,“name”:”Jennika Zyp”}], “ spouse”:{ “ name”:”Nicole Zyp”, “spouse”:{“$ref”:”kriszyp”}, “ children”:[{“$ref”:”jennikazyp”}] } }
  • 6. JSON Referencing (Path Based)‏ { “ name”:”Kris Zyp”, “children”:[{“name”:”Jennika Zyp”}], “ spouse”:{ “ name”:”Nicole Zyp”, “spouse”:{“$ref”:”#”}, “ children”:{“$ref”:”#.children”} } }
  • 7. JSON Referencing (ID + Path)‏ { “ name”:”Kris Zyp”, “ id”:”kriszyp”, “children”:[{“name”:”Jennika Zyp”}], “ friends”:[{“$ref”:”jesse#.spouse”}] }
  • 8. JSON + Schema = JSON Schema
  • 9. JSON Schema schema: {"description":"A person", "type":"object", "properties": {"name": {"type":"string"}, "age" : {"type":"integer", "maximum":125}} } instance: {“name”:”Kris”, “ age”:30}
  • 10. JSON Schema Schema: {"description":"A person", "type":"object", "properties": {"name": {"type":"string"}, "age" : {"type":"integer", "maximum":125, “optional”:true}, “friends”: {“type”:”array”, “items”:{“type”:”object”}} } } instance: {“name”:”Kris”, “ friends”:[{“name”:”Nikki”}] }
  • 11. JSON Schema Schema: {“type”:”array”, “items”:[{“type”:”string”},{“type”:”number”}] } instance: [“foo”,44]
  • 12. JSON Schema Schema: {"description":"A person", "type":["object",”string”] } instance: “ foo” instance: {“prop”:3}
  • 13. JSON Schema Schema: {"description":"A person", "type":["object",”string”] } instance: “ foo” instance: {“prop”:3}
  • 14. JSON Schema schema: {"description":"A person", "type":"object", "properties": {"name": {"type":"string"}, "gender" : {"type":"string", "enum”:[“male”,”female”]}}, “ additionalProperties”:false } instance: {“name”:”Kris”, “ gender”:”male”}
  • 15. What can we do with these?
  • 16. JSON Schema + JSON Referencing {"description":"A Social Person", “id”:”socialperson”, "type":"object", "properties": {"name": {"type":"string"}, "age" : { "type":"integer", "maximum":125 }, "friends" : { “ type” : ”array”, “ items” : {“$ref”:”socialperson”} } }, “ extends”:{“$ref”:”person”} }
  • 17. JSON Referencing + REST Lazy loading - Generic clients can auto-load objects as necessary Object identification can be used for saving state changes http://blog.medryx.org/2008/07/24/jsonreststore-overview/
  • 18. JSON Referencing + REST GET /Person/3 { “ name”:”Kris”, “ friends”:[ {“$ref”:”4”}, {“$ref”:”5”} ] }
  • 19. JSON Referencing + JSON-RPC POST /person/kriszyp { “ method”:”addFriend”, “ id”:”1”, “ params”:[{“$ref”:”jessesmith”}] }
  • 21. JSON Schema + Typed Code
  • 23. JSON Schema Interface {"description":"A person", "type":"object", "properties": {"name": {"type":"string"} }, “methods”:{ “getName”:{“returns”:{“type”:”string”}, “params”:[]}, “setName”:{“params”:[{“type”:”string”}]}, } }
  • 24. Cross-site Referencing { “ name”:”Kris Zyp”, “ id”:”kriszyp”, “ friends”:[ {“$ref”:” http://thezyps.com/person/nikki ”}, {“$ref”:” http://social.com/user/33 ”} ] }
  • 26. Mobile code (run anywhere)‏ Code can run anywhere Server JavaScript Environment Browser JavaScript Environment Consistent persisted data structures across environments
  • 27. Connecting and structuring data for the future JSON Schema and JSON Referencing
  • 28.