Correct: Jackson has no knowledge that you have a "special" kind of
Collection there.
I think you can use
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
on your wrapper type to force it to be handled as if POJO, however.
So add that as class annotation for class declaration. That works for
serialization,
for deserialization you will need to use @JsonCreator and a specific
constructor or something.
Alternatively it's also possible to use @JsonValue to return "wrapper
wrapper" type; something that
will be serialized in place of wrapper itself (and does not implement
Collection). That would also
allow whatever serialization you want.
-+ Tatu +-
>
> // Mantas
>
> --
> 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
jackson-user...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/ff942dc9-b537-4dd1-a86e-5ce2d8094c8dn%40googlegroups.com.