Skip to main content

[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

  • From: Tatu Saloranta < >
  • To:
  • Subject: [json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?
  • Date: Mon, 29 Oct 2012 09:20:22 -0700

On Mon, Oct 29, 2012 at 12:48 AM, wenshao 
< >
 wrote:
> such as :
> public class JsonConfiguration {
>     public final static String CONFIG_DATE_FORMAT =
> "javax.json.cofig.dateFormat";
>     public final static String CONFIG_PRETTY_PRINTING =
> "javax.json.config.prettyPrintting";
> }
>
> JsonConfig config = new JsonConfig();
>
> config.put(JsonConfiguration.CONFIG_DATE_FORMAT, "yyyy-MM-dd HH:mm:ss");
> config.put(JsonConfiguration.CONFIG_PRETTY_PRINTING, true);
> config.put("alibaba.json.cacheKeys", true);
> config.put("alibaba.json.cacheKeys.threshold", 1024);
> config.put("alibaba.json.threadLocalBufferCache", true);
> config.put("alibaba.json.threadLocalBufferCache.size", 1024);
> ... ...
>
>
> if JsonFeature is interface, implementation will need to define a lot of
> types.

Types are cheap, why should this be a concern.

But I would expect that in most cases one would define an enum that
implements this interface.

-+ Tatu +-


[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

szujobs 10/29/2012

[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

Tatu Saloranta 10/29/2012

[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

wenshao 10/29/2012

[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

Tatu Saloranta 10/29/2012

[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

Jitendra Kotamraju 10/29/2012

[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

Jörn Horstmann 10/29/2012

[json-processing-spec users] Re: JsonFeature interface - is it meant as a marker or constant?

Jitendra Kotamraju 10/29/2012
 
 
Close
loading
Please Confirm
Close