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.

Adopt-a-JSR session (JSON-B/P)

441 views

Published on

Live broadcast recording: https://www.youtube.com/watch?v=p5WlZg6YZ-4

  • Be the first to comment

Adopt-a-JSR session (JSON-B/P)

  1. 1. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Adopt-a-JSR session JSON-P (JSR-374) + JSON-B (JSR-367) Dmitry Kornilov JSON-B/P Spec Lead January 28, 2017
  2. 2. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  3. 3. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Dmitry Kornilov • Software Developer @ Oracle • JSON-B (JSR-367) spec lead • JSON-P (JSR-374) spec lead • Outstanding Spec Lead 2016 • EclipseLink project committer • dmitry.kornilov@oracle.com • @m0mus
  4. 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Program Agenda JSON Processing (JSR-374) JSON Binding (JSR-367) 1 2
  5. 5. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON Processing JSR-374
  6. 6. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON Processing Overview • JSON Processing API – Standard API to parse, generate, transform, query JSON – Object Model and Streaming API • Similar to DOM and StAX
  7. 7. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON Processing • Streaming API – JsonParser – JsonGenerator • Object model API – JsonReader – JsonWriter – JsonPointer – JsonPatch – JsonMergePatch
  8. 8. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON-P 1.1 (JSR-374) • Update JSON-P spec to stay current with emerging standards (RFC 7159) • Support for IETF standards on – JSON Pointer (RFC 6901) – JSON Patch (RFC 6902) – JSON Merge Patch (RFC 7396) • Add editing/transformation operations to JSON objects and arrays • Support for a streaming API, together with Collectors • Support for processing big JSON, e.g. add filters to JSON parsing • JDK9 support
  9. 9. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | History • 09 Dec 2014 – JSR Submitted • 03 Aug 2015 – Early Draft Review • 31 Oct 2016 – JSR Renewal Ballot • 21 Jan 2017 – Public Draft Submitted • 20 Jan 2017 – TCK completed
  10. 10. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Roadmap • Feb 2017 – Public Review Ballot • Mar 2017 – Public Final Draft Ballot • Apr 2017 – Release
  11. 11. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Releases • JSON-P 1.0.0-M1 released 28/01/2017
  12. 12. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | How can you help? • Test new functionality – JsonPointer, JsonPatch, JsonMergePatch • Tests on real life use cases • Performance testing
  13. 13. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON-P Links • Specification – https://json-processing-spec.java.net • RI: – https://jsonp.java.net • GitHub – https://github.com/json-p • JCP – https://jcp.org/en/jsr/detail?id=374
  14. 14. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | I found a bug! What shall I do? • Check our issue tracker. Maybe this bug is already submitted: – https://java.net/jira/browse/JSONP • Clearly describe the bug • Provide a test so we can simulate it • Submit an issue to JSON-P bugs tracker here: – https://java.net/jira/browse/JSONP • If you have a fix (we appreciate it) submit your merge request here: – https://github.com/json-p/api-ri
  15. 15. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | I would like to suggest a new feature! • Discuss it in our mailing list: – users@json-processing-spec.java.net • Create a feature request in our issues tracker: – https://java.net/jira/browse/JSONP
  16. 16. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON Binding JSR-367
  17. 17. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON Binding Overview JSON-B is standard binding layer for converting Java objects to/from JSON documents public class Customer { public int id = 1; public String firstName = “John”; public String lastName = “Doe”; …. } { "id": 1, "firstName" : "John", "lastName" : "Doe", } Java JSON
  18. 18. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON-B Goals (1/2) • Support binding (serialization and deserialization) for all RFC 7159- compatible JSON documents. • JSON-related specifications will be surveyed to determine their relationship to JSON-Binding. • Maintain consistency with JAXB and other Java EE and SE APIs where appropriate. • Define default mapping of Java classes and instances to JSON document counterparts. • Allow customization of the default mapping definition.
  19. 19. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON-B Goals (2/2) • Default use of the APIs should not require prior knowledge of the JSON document format and specification. • Define or enable integration with JSR 374: Java API for JSON Processing (JSON-P) 1.1.
  20. 20. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Non-Goals • Preserving equivalence (Round-trip) – The specification recommends, but does not require equivalence of content for deserialized and serialized JSON documents. • JSON Schema – Generation of JSON Schema from Java classes, as well as validation based on JSON schema. • JEP 198 Lightweight JSON API – Support and integration with Lightweight JSON API as defined within JEP 198 is out of scope of this specification.
  21. 21. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | History • 26 Aug 2014 – JSR Submitted • 23 Sep 2014 – Expert Group Formation • 20 Aug 2015 – Early Draft Review • 25 May 2016 – Public Review • 26 July 2016 – Public Draft Ballot • 20 Jan 2017 – TCK completed
  22. 22. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Roadmap • Feb 2017 – Minor fixes, GlassFish integration, JDK9 support • Mar 2017 – Public Final Draft Ballot • Apr 2017 – Release
  23. 23. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Releases • JSON-B API 1.0.0-M1 released 28/01/2017 • Yasson 1.0.0-M1 released 26/01/2017
  24. 24. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON-B API related Links • JSON-B web site – http://json-b.net • JSON-B API – https://java.net/projects/jsonb-spec • JCP page – https://www.jcp.org/en/jsr/detail?id=367
  25. 25. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Yasson-related Links • Yasson on Eclipse.org – https://projects.eclipse.org/projects/rt.yasson • Yasson on GitHub – https://github.com/eclipse/yasson • Yasson user forums – https://www.eclipse.org/forums/index.php/f/356/ • Mailing list: – https://dev.eclipse.org/mailman/listinfo/yasson-dev
  26. 26. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JSON-B Demo • GitHub – https://github.com/m0mus/JavaOne2016-JSONB-Demo • Demonstrates – Default mapping – Adapters – Serializers – Mapping of generic class
  27. 27. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | How can you help? • Yasson – Tests on real life use cases – Performance testing – Performance comparison – Performance optimization • Evangelism – Samples, guides, manuals – Blog articles
  28. 28. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | I found a bug! What shall I do? • Check our issue tracker. Maybe this bug is already submitted: – https://github.com/eclipse/yasson • Clearly describe the bug • Provide a test so we can simulate it • Submit an issue to Yasson bugs tracker here: – https://github.com/eclipse/yasson/issues • If you have a fix (we appreciate it) submit your merge request here: – https://github.com/eclipse/yasson
  29. 29. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | I would like to suggest a new feature! • Discuss it in our mailing list: – users@jsonb-spec.java.net • Create a feature request in our API issues tracker: – https://java.net/jira/browse/JSONB_SPEC

×