users@jsonb-spec.java.net

[jsonb-spec users] Re: Comments on EDR

From: Dmitry Kornilov <dmitry.kornilov_at_oracle.com>
Date: Fri, 29 Jan 2016 17:45:06 +0100

Hi Sebastian!

On 29.1.2016 09:08, Sebastian Daschner wrote:
> Hi experts,
>
> Thanks for the work done so far.
>
> I have some comments / questions on the Early Draft.
>
>
> 1) As Section 1.2 states JAX-RS should be integrated with JSONB. Are
> there already plans in which functionality such an integration will cover?
>
> It would be very helpful for enabling Hypermedia in JSON responses to
> have the possibility to create URIs to JAX-RS resources -- ideally via
> annotations.
>
> For example JAX-RS's UriBuilder [1] provides helpful functionality to
> create URIs. Do you think it's feasible to add something like
> @JsonbResourceLink(<jaxrs-resource-class>.class, "methodName") -- idally
> with the possibility to replace path params with properties of the POJO?
I don't fully understand your point. Can you please explain your example
in more details. What is the result of link deserialization?

> 2) JsonbAdapter has parameterized methods rather than JsonbAdapter
> itself being a parameterized type (as it is for JAXB's XmlAdapter). What
> were the ideas behind this?
>
> While implementing some examples I noticed that it would be helpful to
> have concrete types of both the ValueType and the BoundType in the
> method bodies, otherwise the Object's have to be casted. Or am I missing
> something here?
Adapters are changed. They are similar to JAXB adapters now.
Ex: Adapter<From, To>
> 3) Are there discussions to enable CDI integration for JsonbAdapters?
> IMO a drawback of JAXB's XmlAdapter was not to be able to inject CDI
> managed beans.
>
> We often had the situation in projects that we wanted to deserialize
> some primitive into a more complex object using logic from existing JEE
> components.
This is a good point. I am not sure that this is a spec related though.
I would leave it up to implementations.
> 4) Is there a roadmap for an early version of the RI? Btw, I would be
> glad to contribute if there is a need for more workforce...
Thanks for offering. We have enough resources for now. We are very close
to a first RI alpha at the moment. Currently it's a part of EclipseLink
project. You can check it out from:
git.eclipse.org/gitroot/eclipselink/eclipselink.runtime.git

It's in jsonb directory.

Thanks,
Dmitry Kornilov