users@jsonb-spec.java.net

[jsonb-spec users] [jsr367-experts] Re: Re: [2-DefaultMapping] Proposal

From: Romain Manni-Bucau <rmannibucau_at_tomitribe.com>
Date: Mon, 16 Mar 2015 19:25:59 +0100

Sure, sorry to not have done it in my previous mail:

Map<String, Object> properties = new HashMap<>();
properties.put(JsonGenerator.PRETTY_PRINTING,
true);JsonGeneratorFactory jf =
Json.createGeneratorFactory(properties);


*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*
<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau
<http://fr.linkedin.com/in/rmannibucau>*
*Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*


2015-03-16 19:12 GMT+01:00 Inderjeet Singh <inder_at_alumni.stanford.edu>:

> I am not as familiar with how this is done in jsonp. Can you give me a
> pointer?
> Thanks
> Inder
>
> On Mon, Mar 16, 2015 at 11:05 AM, Romain Manni-Bucau <
> rmannibucau_at_tomitribe.com> wrote:
>
>> Well on that topic I'd stay aligned with jsonp.
>>
>> Plus each time I saw such an API it was never used or badly used - json
>> to xml formatter comes immediately to my mind.
>> Le 16 mars 2015 18:51, "Inderjeet Singh" <inder_at_alumni.stanford.edu> a
>> écrit :
>>
>>
>>>
>>> On Mon, Mar 16, 2015 at 9:50 AM, Romain MB <rmannibucau_at_tomitribe.com>
>>> wrote:
>>>
>>>> 2015-03-16 17:35 GMT+01:00 Eugen Cepoi <cepoi.eugen_at_gmail.com>:
>>>> >
>>>> >
>>>> > 2015-03-16 17:21 GMT+01:00 Inderjeet Singh <inder_at_alumni.stanford.edu
>>>> >:
>>>> >>
>>>> >> In Gson, we have a GsonBuilder.setPrettyPrinting() setting. This
>>>> mostly
>>>> >> works but is inflexible.
>>>> >> However, I think a better approach is to allow a formatter object
>>>> that
>>>> >> allows configuration per any formatting styles. You can use the
>>>> formatting
>>>> >> styles of an IDE such as Eclipse.
>>>> >
>>>>
>>>