On 12/09/15 22:01, Carlos Guzman wrote:
> Hi guys,
> Regarding the point 4.6, not only the instantiation of classes with no
> default constructor is needed, but the support of injected objects at
> @JsonbCreator methods. (@JsonbInject?)
> There are cases when the object requires a parent object not part of
> the json document. So, before the unmarshalling operation returns the
> created object, it should be properly assigned.
> There should be a way to have a map of objects ready to inject, so
> when the @JsonbInject is found, it should be properly assigned. (Map
> of objects to inject should be available at Jsonb level or at a
> Jsonb::fromJson level).
> Please, see the @JsonInject implementation in Jackson, this is what
> I'm talking about.
> I just needed this feature few days ago and it was amazing to discover it.
May I ask you to file an issue for this and describe the usecase
slightly more there? At this point I don't see this as something
required for 1.0 but would like to make sure this is filed and
considered properly.
> Regarding the point 3.7, with the use of the @JsonbCreator, there is
> no need of this restriction. Or at least make it conditional:
> "Any instance passed to an unmarshalling operation must have a public
> or protected no-argument constructor *if there is no JsonbCreator
> method declared*."
Even though the whole section is aimed to describe default
(non-customized) mapping, I agree it does make sense to add some
clarification around JsonbCreator implications.
MartiNG