Skip to main content

[jsr353-experts] JSON_PROCESSING_SPEC-40: JsonBuilder and JsonReader should be interfaces

  • From: Jitendra Kotamraju < >
  • To:
  • Cc:
  • Subject: [jsr353-experts] JSON_PROCESSING_SPEC-40: JsonBuilder and JsonReader should be interfaces
  • Date: Fri, 11 Jan 2013 11:49:18 -0800

I think we have quite a bit of discussion on this in the mailing lists. The issue[1] has all the pointers of discussion. Let me summarize the options:

1. Leave as it is. Developers would be using new JsonReader(), new JsonWriter(), new JsonObjectBuilder()/new JsonArrayBuilder(). An implementation detail is to implement caching of provider in the API.

2. JsonReader/JsonWriter will have additional constructors that take provider.

3. Introduce JsonReaderFactory/JsonWriterFactory and make JsonReader/JsonWriter as interfaces.
Also Json.createReader(), Json.createWriter() for common cases. But we need to see how this works out with Json class as it may become kitchen-sink.

4. Option 3 + Json.createObjectBuilder() and Json.createArrayBuilder() (may be factories for them as well).

5. Any ??

Let us resolve this issue soon as it may involve many changes.

Jitu
[1] http://java.net/jira/browse/JSON_PROCESSING_SPEC-40


[jsr353-experts] JSON_PROCESSING_SPEC-40: JsonBuilder and JsonReader should be interfaces

Jitendra Kotamraju 01/11/2013

[jsr353-experts] Re: JSON_PROCESSING_SPEC-40: JsonBuilder and JsonReader should be interfaces

Jörn Horstmann 01/11/2013

[jsr353-experts] Re: [json-processing-spec users] Re: JSON_PROCESSING_SPEC-40: JsonBuilder and JsonReader should be interfaces

Jitendra Kotamraju 01/11/2013
 
 
Close
loading
Please Confirm
Close