[json-processing-spec users] [jsr353-experts] JsonBuilder and JsonReader as interfaces
- From: Jörn Horstmann <
- Subject: [json-processing-spec users] [jsr353-experts] JsonBuilder and JsonReader as interfaces
- Date: Sun, 02 Dec 2012 14:09:08 +0100
- List-id: <jsr353-experts.json-processing-spec.java.net>
I would like to reopen the discussion on whether JsonBuilder and
JsonReader should be interfaces or implementation classes. In my
opinion interfaces would be a cleaner solution.
- if both JsonParser and JsonReader are provided by the
implementation it would allow for possibly better performance due to
tighter coupling or code reuse between these classes.
- Having classes implementing JsonObject/JsonArray inside the api
package (even as private static classes inside JsonBuilder) seems not
really clean to me.
- If we implement http://java.net/jira/browse/JSON_PROCESSING_SPEC-9
a json structure could consist of a mix between implementations from
the api package and implementation defined classes.
The only downside I see would be even more static methods in the Json
class. Maybe some of these methods should be removed anyway as they
could be replaced by calls to Json.createParserFactory and
Json.createGeneratorFactory, leaving only the most common parameter