adopt-a-jsr session (json-b/p)
TRANSCRIPT
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Adopt-a-JSR sessionJSON-P (JSR-374) + JSON-B (JSR-367)
Dmitry KornilovJSON-B/P Spec Lead
January 28, 2017
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor StatementThe 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.
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
• [email protected]• @m0mus
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
JSON Processing (JSR-374)
JSON Binding (JSR-367)
1
2
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
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JSON Processing• Streaming API– JsonParser– JsonGenerator
• Object model API– JsonReader– JsonWriter– JsonPointer– JsonPatch– JsonMergePatch
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
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
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
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Releases• JSON-P 1.0.0-M1 released 28/01/2017
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
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
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
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
I would like to suggest a new feature!• Discuss it in our mailing list:– [email protected]
• Create a feature request in our issues tracker:– https://java.net/jira/browse/JSONP
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JSON Binding OverviewJSON-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
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.
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.
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.
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
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
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
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
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
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
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
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
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
I would like to suggest a new feature!• Discuss it in our mailing list:– [email protected]
• Create a feature request in our API issues tracker:– https://java.net/jira/browse/JSONB_SPEC