> Unfortunately reading/writing Object Id values, references, requires
> support by value (de)serializers

Thanks Tatu. I sort of figured it out. I also tried to implement
serialization inside
my own handler based on the infrastructure provided by Jackson
(annotations and ObjectIdReader, etc.),
but there seemed to be always some piece missing -- browsing through the code
those pieces are typically passed around but are not easily provided
via the contexts
(serialization or deserialization).

I also checked the tests, but I didn't find any obvious example there.

I would gladly resort to implementing my own id-resolution inside the
serializer -- this seems the easiest way to go, actually,
but I'd appreciate some help on understanding the lifecycle of the
"per-serialization/deserialization" contexts inside the
serializer and deserializer so that I can implement in in a nice way.

I'll need a per-serialization (or deserialization) bidirectional
mapping between object IDs and objects. I can hack this
inside the serialize/deserialize methods and lazily check/ create a
custom attribute in SerializerProvider and
in DeserializationContext. Is there any nicer way of doing this you
can thing of?

Dawid

-- 
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