SlideShare a Scribd company logo
1 of 28
{
    “Talk” :
      “JSON Validation
      using JSON Schema and
      Jackson”,

    “by” : “Stephane Rondal”
}
stephane.rondal@arexo.be
@stephanerondal
JSON
JSON
 • Very present in Web 2.0 and mobile apps
JSON
 • Very present in Web 2.0 and mobile apps
 • With REST, typically serves as the data exchange format
JSON
 • Very present in Web 2.0 and mobile apps
 • With REST, typically serves as the data exchange format
 • Sometimes even derived automatically from POJOs
JSON
 • Very present in Web 2.0 and mobile apps
 • With REST, typically serves as the data exchange format
 • Sometimes even derived automatically from POJOs
 • Part of the interface between client and server
JSON
 • Very present in Web 2.0 and mobile apps
 • With REST, typically serves as the data exchange format
 • Sometimes even derived automatically from POJOs
 • Part of the interface between client and server
 • Stability / Backward-compatibility??
JSON
 • Very present in Web 2.0 and mobile apps
 • With REST, typically serves as the data exchange format
 • Sometimes even derived automatically from POJOs
 • Part of the interface between client and server
 • Stability / Backward-compatibility??
JSON Schema
JSON Schema


Represents the structure of a JSON document
Much like XML Schema does for XML documents
n’t r un
         a it, do
 X ML ?W          t!
          ay   ye
       aw
Much like XML Schema does for XML documents
Keeping the simple and
lightweight aspects of JSON we
          have all come to love
JSON Schema
JSON Schema
 • A schema is a JSON document
JSON Schema
 • A schema is a JSON document
 • Specifies
   •   Properties
       •Type (simple, complex)
       •Required/Optional
       •Simple constraints
   •   And more...
{

   "description": "An Address following the convention ...",

   "type":"object",

   "properties": {

   
 "post-office-box": { "type": "string" },

   
 "extended-address": { "type": "string" },

   
 "street-address": { "type": "string" },

   
 "locality":{ "type": "string", "required": true },

   
 "region": { "type": "string", "required": true },

   
 "postal-code": { "type": "string" },

   
 "country-name": { "type": "string", "required": true}

   },

   "dependencies": {

   
 "post-office-box": "street-address",

   
 "extended-address": "street-address"

   }
}
An IETF draft standard (3rd version)
Why
   use
  JSON
Schema ?
Documentation
Automation
Code / UI Generation
Or Why Not ?
Demo
References
 • www.json.org
 • json-schema.org
 • tools.ietf.org/html/draft-zyp-json-schema-03
 • github.com/fge/json-schema-validator
Q&A

More Related Content

What's hot

JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The BasicsJeff Fox
 
MongoDB Mojo: Building a Basic Perl App
MongoDB Mojo: Building a Basic Perl AppMongoDB Mojo: Building a Basic Perl App
MongoDB Mojo: Building a Basic Perl AppStennie Steneker
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2kriszyp
 
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentosConceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentosMongoDB
 
Top JSON Interview Questions for Freshers
Top JSON Interview Questions for FreshersTop JSON Interview Questions for Freshers
Top JSON Interview Questions for FreshersHitesh Kumar
 
Writing Domain Specific Languages with JSON Schema
Writing Domain Specific Languages with JSON SchemaWriting Domain Specific Languages with JSON Schema
Writing Domain Specific Languages with JSON SchemaYos Riady
 
Fluentdでログ収集「だけ」やる話 #study2study
Fluentdでログ収集「だけ」やる話 #study2studyFluentdでログ収集「だけ」やる話 #study2study
Fluentdでログ収集「だけ」やる話 #study2studySATOSHI TAGOMORI
 
MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)
MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)
MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)MongoDB
 
COUNTWORDSFREE - WORD COUNTER
COUNTWORDSFREE - WORD COUNTERCOUNTWORDSFREE - WORD COUNTER
COUNTWORDSFREE - WORD COUNTERKirylTravulka
 
RESTful JSON web databases
RESTful JSON web databasesRESTful JSON web databases
RESTful JSON web databaseskriszyp
 
Rest With Json Vs Soap With Xml
Rest With Json Vs Soap With XmlRest With Json Vs Soap With Xml
Rest With Json Vs Soap With XmlKaniska Mandal
 
萌典與零時政府
萌典與零時政府萌典與零時政府
萌典與零時政府Audrey Tang
 

What's hot (20)

JSON
JSONJSON
JSON
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
Json
JsonJson
Json
 
Json
JsonJson
Json
 
Json
JsonJson
Json
 
MongoDB Mojo: Building a Basic Perl App
MongoDB Mojo: Building a Basic Perl AppMongoDB Mojo: Building a Basic Perl App
MongoDB Mojo: Building a Basic Perl App
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 
Json
JsonJson
Json
 
Json Tutorial
Json TutorialJson Tutorial
Json Tutorial
 
Java script and json
Java script and jsonJava script and json
Java script and json
 
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentosConceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
 
Top JSON Interview Questions for Freshers
Top JSON Interview Questions for FreshersTop JSON Interview Questions for Freshers
Top JSON Interview Questions for Freshers
 
Writing Domain Specific Languages with JSON Schema
Writing Domain Specific Languages with JSON SchemaWriting Domain Specific Languages with JSON Schema
Writing Domain Specific Languages with JSON Schema
 
Fluentdでログ収集「だけ」やる話 #study2study
Fluentdでログ収集「だけ」やる話 #study2studyFluentdでログ収集「だけ」やる話 #study2study
Fluentdでログ収集「だけ」やる話 #study2study
 
MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)
MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)
MongoDB Schema Design (Event: An Evening with MongoDB Houston 3/11/15)
 
COUNTWORDSFREE - WORD COUNTER
COUNTWORDSFREE - WORD COUNTERCOUNTWORDSFREE - WORD COUNTER
COUNTWORDSFREE - WORD COUNTER
 
RESTful JSON web databases
RESTful JSON web databasesRESTful JSON web databases
RESTful JSON web databases
 
Rest With Json Vs Soap With Xml
Rest With Json Vs Soap With XmlRest With Json Vs Soap With Xml
Rest With Json Vs Soap With Xml
 
JSON - Quick Overview
JSON - Quick OverviewJSON - Quick Overview
JSON - Quick Overview
 
萌典與零時政府
萌典與零時政府萌典與零時政府
萌典與零時政府
 

Similar to Devoxx - JSON Validation using JSON Schema and Jackson

JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12Jitendra Zaa
 
json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college projectAmitSharma397241
 
Json - ideal for data interchange
Json - ideal for data interchangeJson - ideal for data interchange
Json - ideal for data interchangeChristoph Santschi
 
LF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat
 
CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009Jason Davies
 
Pythonlearn-13-WebServices.pptx
Pythonlearn-13-WebServices.pptxPythonlearn-13-WebServices.pptx
Pythonlearn-13-WebServices.pptxnishant874609
 
Differential Sync and JSON Patch @ SpringOne2GX 2014
Differential Sync and JSON Patch @ SpringOne2GX 2014Differential Sync and JSON Patch @ SpringOne2GX 2014
Differential Sync and JSON Patch @ SpringOne2GX 2014Brian Cavalier
 
JSON and the Oracle Database
JSON and the Oracle DatabaseJSON and the Oracle Database
JSON and the Oracle DatabaseMaria Colgan
 
Easy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in SparkEasy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in SparkYin Huai
 

Similar to Devoxx - JSON Validation using JSON Schema and Jackson (20)

Json at work overview and ecosystem-v2.0
Json at work   overview and ecosystem-v2.0Json at work   overview and ecosystem-v2.0
Json at work overview and ecosystem-v2.0
 
Hands on JSON
Hands on JSONHands on JSON
Hands on JSON
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Json
JsonJson
Json
 
JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
 
json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college project
 
Json
JsonJson
Json
 
Json - ideal for data interchange
Json - ideal for data interchangeJson - ideal for data interchange
Json - ideal for data interchange
 
Json the-x-in-ajax1588
Json the-x-in-ajax1588Json the-x-in-ajax1588
Json the-x-in-ajax1588
 
LF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON Schema
 
CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009
 
Pythonlearn-13-WebServices.pptx
Pythonlearn-13-WebServices.pptxPythonlearn-13-WebServices.pptx
Pythonlearn-13-WebServices.pptx
 
Json
JsonJson
Json
 
Differential Sync and JSON Patch @ SpringOne2GX 2014
Differential Sync and JSON Patch @ SpringOne2GX 2014Differential Sync and JSON Patch @ SpringOne2GX 2014
Differential Sync and JSON Patch @ SpringOne2GX 2014
 
Json
JsonJson
Json
 
JSON and the Oracle Database
JSON and the Oracle DatabaseJSON and the Oracle Database
JSON and the Oracle Database
 
JSON.pptx
JSON.pptxJSON.pptx
JSON.pptx
 
Json1
Json1Json1
Json1
 
Easy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in SparkEasy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in Spark
 

More from srondal

Introduction to Minecraft Modding at YaJUG
Introduction to Minecraft Modding at YaJUGIntroduction to Minecraft Modding at YaJUG
Introduction to Minecraft Modding at YaJUGsrondal
 
Apprendre a Coder au WAJUG
Apprendre a Coder au WAJUGApprendre a Coder au WAJUG
Apprendre a Coder au WAJUGsrondal
 
Introduction to SAFe, the Scaled Agile Framework
Introduction to SAFe, the Scaled Agile FrameworkIntroduction to SAFe, the Scaled Agile Framework
Introduction to SAFe, the Scaled Agile Frameworksrondal
 
Management is Dead
Management is DeadManagement is Dead
Management is Deadsrondal
 
Lessons learned from scaling Agile to distributed, offshore teams
Lessons learned from scaling Agile to distributed, offshore teamsLessons learned from scaling Agile to distributed, offshore teams
Lessons learned from scaling Agile to distributed, offshore teamssrondal
 
Agile Tour Brussels 2012 - Estimating user stories
Agile Tour Brussels 2012 - Estimating user storiesAgile Tour Brussels 2012 - Estimating user stories
Agile Tour Brussels 2012 - Estimating user storiessrondal
 

More from srondal (6)

Introduction to Minecraft Modding at YaJUG
Introduction to Minecraft Modding at YaJUGIntroduction to Minecraft Modding at YaJUG
Introduction to Minecraft Modding at YaJUG
 
Apprendre a Coder au WAJUG
Apprendre a Coder au WAJUGApprendre a Coder au WAJUG
Apprendre a Coder au WAJUG
 
Introduction to SAFe, the Scaled Agile Framework
Introduction to SAFe, the Scaled Agile FrameworkIntroduction to SAFe, the Scaled Agile Framework
Introduction to SAFe, the Scaled Agile Framework
 
Management is Dead
Management is DeadManagement is Dead
Management is Dead
 
Lessons learned from scaling Agile to distributed, offshore teams
Lessons learned from scaling Agile to distributed, offshore teamsLessons learned from scaling Agile to distributed, offshore teams
Lessons learned from scaling Agile to distributed, offshore teams
 
Agile Tour Brussels 2012 - Estimating user stories
Agile Tour Brussels 2012 - Estimating user storiesAgile Tour Brussels 2012 - Estimating user stories
Agile Tour Brussels 2012 - Estimating user stories
 

Devoxx - JSON Validation using JSON Schema and Jackson

  • 1. { “Talk” : “JSON Validation using JSON Schema and Jackson”, “by” : “Stephane Rondal” }
  • 4. JSON • Very present in Web 2.0 and mobile apps
  • 5. JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format
  • 6. JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format • Sometimes even derived automatically from POJOs
  • 7. JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format • Sometimes even derived automatically from POJOs • Part of the interface between client and server
  • 8. JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format • Sometimes even derived automatically from POJOs • Part of the interface between client and server • Stability / Backward-compatibility??
  • 9. JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format • Sometimes even derived automatically from POJOs • Part of the interface between client and server • Stability / Backward-compatibility??
  • 11. JSON Schema Represents the structure of a JSON document
  • 12. Much like XML Schema does for XML documents
  • 13. n’t r un a it, do X ML ?W t! ay ye aw Much like XML Schema does for XML documents
  • 14. Keeping the simple and lightweight aspects of JSON we have all come to love
  • 16. JSON Schema • A schema is a JSON document
  • 17. JSON Schema • A schema is a JSON document • Specifies • Properties •Type (simple, complex) •Required/Optional •Simple constraints • And more...
  • 18. { "description": "An Address following the convention ...", "type":"object", "properties": { "post-office-box": { "type": "string" }, "extended-address": { "type": "string" }, "street-address": { "type": "string" }, "locality":{ "type": "string", "required": true }, "region": { "type": "string", "required": true }, "postal-code": { "type": "string" }, "country-name": { "type": "string", "required": true} }, "dependencies": { "post-office-box": "street-address", "extended-address": "street-address" } }
  • 19. An IETF draft standard (3rd version)
  • 20. Why use JSON Schema ?
  • 21.
  • 23. Automation Code / UI Generation
  • 25. Demo
  • 26. References • www.json.org • json-schema.org • tools.ietf.org/html/draft-zyp-json-schema-03 • github.com/fge/json-schema-validator
  • 27.
  • 28. Q&A

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n