2.1 Please describe the proposed Specification:

JSON has grown considerably as a portable means to represent objects and data. It is used by more and more systems and layers, ranging from web services to configuration data.

The recently established Java API for JSON Processing (JSON-P) specification defines a standard API for parsing and generating JSON data. The next logical step is to standardize a way to convert JSON into Java objects and vice versa. JSON-B will leverage JSON-P and provide a conversion layer above it.

JSON-B will be the standard binding layer for converting Java objects to/from JSON messages. A default mapping algorithm will be defined for converting existing Java classes to JSON. The default mappings can be customized through the use of Java annotations and will be leveraged by the JSON-B runtime to convert Java objects to/from JSON.

JSON-B will be useful to a number of the upper layers, such as JAX-RS. The requirements of these layers may be complex and include such features as bidirectional mappings and composite key support. Such requirements, as well as others that may be discussed, will be considered and incorporated as time permits.

As JAXB has been a successful platform for XML binding, JSON-B will have a similar feel. This will make it easier for JSON-B to be adopted by Java SE and Java EE developers.

This JSR is targeted for Java SE 7 or higher and Java EE 7 or higher platforms.

2.3 The Executive Committees would like to ensure JSR submitters think about how their proposed technology relates to all of the Java platform editions. Please provide details here for which platform editions are being targeted by this JSR, and how this JSR has considered the relationship with the other platform editions.

This JSR will work with Java EE 7 and will be targeted for inclusion in Java EE 8.

2.4 What need of the Java community will be addressed by the proposed specification?

There is currently a need in JAX-RS to convert objects to/from JSON messages. The community is currently forced to do one of the following:

- Do the conversion themselves
- Use JAXB with libraries like Jettison to get a 'good enough' conversion.
- Use non-standard tools, resulting in non-portable applications.

Many services (Twitter, Google Geocoding API, etc) are offering data via JSON messages that Java developers need to interact with as Java objects. Some such as Twitter are even dropping the XML version of these APIs.

2.5 Why isn't this need met by existing specifications?

Java API for JSON Processing (JSON-P) JSR

- The above JSR provides a generic model to represent a JSON message. JSON-B will bind the JSON message to a real object domain model.

Java API for XML Binding (JAXB) JSR

The JSON databinding need is currently being addressed by the JAXB specification together with libraries that expose JSON messages via StAX APIs. However, this approach faces following problems:

- Some of the JAXB mapping concepts have no JSON equivalent: namespaces, substitution groups, etc. Problems can arise when these mappings are used to produce JSON messages.

- It is difficult to produce JSON messages with collections of size one. This is due to a difference in the way JSON and XML represent collections.

- The JAXB approach assumes that the XML and JSON messages have same general structure and names.

2.6 Please give a short description of the underlying technology or technologies:

JSON-B will integrate with Java API for JSON Processing (JSON-P).

2.7 Is there a proposed package name for the API Specification? (i.e., javapi.something, org.something, etc.)

javax.json.bind

2.8 Does the proposed specification have any dependencies on specific operating systems, CPUs, or I/O devices that you know of?

No.

2.9 Are there any security issues that cannot be addressed by the current security model?

No.

2.10 Are there any internationalization or localization issues?

This specification uses the I18N support in Java SE.

2.11 Are there any existing specifications that might be rendered obsolete, deprecated, or in need of revision as a result of this work?

No.

2.12 Please describe the anticipated schedule for the development of this
specification.

- What is the location of your publicly-accessible Issue list? In order to enable EC members to judge whether Issues have been adequately addressed, the list must make a clear distinction between Issues that are still open, Issues that have been deferred, and those that are closed, and must indicate the reason for any change of state.

- What is the mechanism for the public to provide feedback on your JSR?

Public mailing list will be used for comments (users@jsonb-spec.java.net)

- Where is the publicly-accessible document archive for your Expert Group?

At the java.net project page for the JSR.

- Does the Community tab for my JSR have links to and information about all public communication mechanisms and sites for the development of my JSR?

Yes, it will.

- Do you have a Twitter account or other social networking feed which people can follow for updates on your JSR?

Public user list and project site will be used to provide updates on the JSR.

- Which specific areas of feedback should interested community members (such as the Adopt-a-JSR program) provide to improve the JSR (please also post this to your Community tab)?

Technical feedback for individual parts of the JSR is welcome.

2.15 Please describe how the RI and TCK will de delivered, i.e. as part of a profile or platform edition, or stand-alone, or both. Include version information for the profile or platform in your answer.

The RI and TCK will be provided stand-alone, and will be included in the Java EE 8 RI and TCK.

2.16 Please state the rationale if previous versions are available stand-alone and you are now proposing in 2.13 to only deliver RI and TCK as part of a profile or platform edition (See sections 1.1.5 and 1.1.6 of the JCP 2 document).

N/A

2.17 Please provide a description of the business terms for the Specification, RI and TCK that will apply when this JSR is final.

As required by the Java Specification Participation Agreement (JSPA), the TCK will be licensed at no charge without support to qualified not-for-profit. The Compatibility Testing Scholarship Program will verify such qualification. Support may also be provided at no charge with approval of the scholarship board. For more information, please refer to:
http://www.oracle.com/technetwork/java/index-137188.html

2.18 Please describe the communications channel you have established for the public to observe Expert Group deliberations, provide feedback, and view archives of all Expert Group communications.

3.2 Explanation of how these items might be used as a starting point for the work.

There is now enough industry experience with object-to-JSON binding that the lessons learned from current implementations can be leveraged to form a Java standard that will add value to the Java stack.

Section 4: Additional Information (Optional)

4.1 This section contains any additional information that the submitting Member wishes to include in the JSR.

There are several open source object-to-JSON binding solutions available today. The leads of these projects will be invited to join this expert group.