[jsr353-experts] JSON_PROCESSING_SPEC-40: JsonBuilder and JsonReader should be interfaces
- From: Jitendra Kotamraju <
- 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 has all the pointers of discussion. Let me summarize the
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
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
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.