At this point I don't see a way to achieve wrapping with a root POJO using 
BeanSerializerModifier so I'm committed to the course of extending 
DefaultSerializerProvider. This means that I have to bootstrap when I 
create my ObjectMappers rather than by defining a module.

-karl


On Sunday, August 14, 2016 at 10:09:30 PM UTC-7, Karl the Pagan wrote:
>
> I'm looking into different ways of supporting json-api and json-ld models 
> in Spring (specifically building on spring-hateoas).
>
> My current json-api investigation has lead me to favor serializing and 
> deserializing model types directly and wrapping them as needed. I am 
> looking for the simplest recommendation of wrapping a root element in a 
> POJO.
>
> At the moment I am extending DefaultSerializerProvider and 
> DefaultDeserializationContext in order to wrap the root element (for 
> serializers) / replace the root JavaType (for deserializers). The 
> replacement can then be the target of mixins. Work in progress: 
> https://github.com/karlthepagan/jackson-examples/blob/develop/src/main/java/karl/codes/jackson/JsonWrap.java
>
> Does anyone have a suggestion for a simpler or more elegant approach?
>
> -karl
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to