Hi!
So, im tryin to use @JsonIdentityInfo to avoid ciclical relationships
because i'm trying to serialize an hibernate entity with a one-to-many
relationship.
My functions needs to return a List of the child class element, and the
serialization should include the parent but not the childs of the parent
(to avoid the cycle), something like this:
child: {prop1: xxxx, prop2: yyyy, parent: {propParent1: bbbbb, childs:
null} }
JsonIdentityInfo do this great, my problem happens when the same parent
class has multiple childs in my list of elements, in this case the parent
is only serialized in his first appearence and the next times the only
thing shown is the id (as defined in JsonIdentityInfo).
So, i want to know if its posible in to apply JsonIdentityInfo ONCE per
element on the list, meaning: if two element of the list have the same
parent serialize them both, but if the same element tries to serialize the
same object two times, then serialize only the id
--
Confidentiality Notice:
This e-mail and any documents, files or previous
e-mail messages attached to it may contain confidential information that is
legally privileged. If you are not the intended recipient, or a person
responsible for delivering it to the intended recipient, you are hereby
notified that any disclosure, copying, distribution or use of any of the
information contained in or attached to this transmission is strictly
prohibited. If you have received this transmission in error, please
immediately notify the sender. Please destroy the original transmission and
its attachments without reading or saving in any manner.
--
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.