users@jsonb-spec.java.net

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

From: Eugen Cepoi <cepoi.eugen_at_gmail.com>
Date: Thu, 12 Mar 2015 17:36:54 +0100

Hey Martins,

Quick feedback on the API.

I don't like much the to/from in JsonbConfig. At least for the formatting
it is obvious that it exists only during serialization.
Not sure ConfigException is needed, I mean sure in some case we could throw
this exception, but in practice maybe no one will. Also in multiple places
I see IllegalArgumentEx, and it makes sense, we could same way use other
existing exceptions - instead of ConfigEx.

getProperty could return an Optional and throw an exception only if the arg
is null.

We could also add an option to skip null during serialization in the config.

In JsonbBuilder, the newBuilder related to JsonbProvider are a bit
redundant as we also have similar method inside the provider. But from
another side, it provides a single entry point - this is good. This makes
the API more easy to use.

I didn't read the javadoc carefully.

About the examples... well they are just examples :)

Eugen


2015-03-12 16:46 GMT+01:00 Martin Grebac <martin.grebac_at_oracle.com>:

> Just would like to explicitly point to the spec document itself in this
> branch:
>
> https://java.net/projects/jsonb-spec/sources/git/
> content/spec/spec.pdf?rev=da7db533076856699cec49a4eebd300b9f4a7230
>
> MartiNG
>
>
> On 12.03.15 16:35, Martin Vojtek wrote:
>
>> Hi Experts,
>>
>> there has been a lot of changes recently in default_mapping. This
>> completes the second iteration of default mapping proposal.
>>
>> Generics and integration with JSON Processing is not part of this
>> discussion.
>>
>> Please take a look and feel free to express your point of view.
>>
>> https://github.com/json-binding/spec/tree/default_mapping
>>
>> Looking forward to your feedback.
>>
>> MartinV
>>
>
>