Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
{    “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 ...
JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format • Sometimes even ...
JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format • Sometimes even ...
JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format • Sometimes even ...
JSON Schema
JSON SchemaRepresents 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       awMuch like XML Schema does for XML documents
Keeping the simple andlightweight 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/Option...
{   "description": "An Address following the convention ...",   "type":"object",   "properties": {    "post-office-box": {...
An IETF draft standard (3rd version)
Why   use  JSONSchema ?
Documentation
AutomationCode / 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-va...
Q&A
Devoxx - JSON Validation using JSON Schema and Jackson
Devoxx - JSON Validation using JSON Schema and Jackson
Upcoming SlideShare
Loading in …5
×

Devoxx - JSON Validation using JSON Schema and Jackson

4,420 views

Published on

  • Be the first to comment

  • Be the first to like this

Devoxx - JSON Validation using JSON Schema and Jackson

  1. 1. { “Talk” : “JSON Validation using JSON Schema and Jackson”, “by” : “Stephane Rondal”}
  2. 2. stephane.rondal@arexo.be@stephanerondal
  3. 3. JSON
  4. 4. JSON • Very present in Web 2.0 and mobile apps
  5. 5. JSON • Very present in Web 2.0 and mobile apps • With REST, typically serves as the data exchange format
  6. 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. 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. 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. 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??
  10. 10. JSON Schema
  11. 11. JSON SchemaRepresents the structure of a JSON document
  12. 12. Much like XML Schema does for XML documents
  13. 13. n’t r un a it, do X ML ?W t! ay ye awMuch like XML Schema does for XML documents
  14. 14. Keeping the simple andlightweight aspects of JSON we have all come to love
  15. 15. JSON Schema
  16. 16. JSON Schema • A schema is a JSON document
  17. 17. JSON Schema • A schema is a JSON document • Specifies • Properties •Type (simple, complex) •Required/Optional •Simple constraints • And more...
  18. 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. 19. An IETF draft standard (3rd version)
  20. 20. Why use JSONSchema ?
  21. 21. Documentation
  22. 22. AutomationCode / UI Generation
  23. 23. Or Why Not ?
  24. 24. Demo
  25. 25. References • www.json.org • json-schema.org • tools.ietf.org/html/draft-zyp-json-schema-03 • github.com/fge/json-schema-validator
  26. 26. Q&A

×