I am working with an object with multiple bi-directional reference, some of these references are deep within the object. I want to be able to serialize and deserialize this object. Once serialized, I want to be able to use the equivalent/serialized JSON using javascript(client side), and also be able to send this JSON back to the back end and have it deserialized correctly. I am using spring MVC for the back end.
I have tried JSOG, works perfectly for serialization, but fails to deserialized.
I have also used
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)
public class A {
.
.
}
But the JSON received on the client side is unusable as it is, but has those @id
fields.
Any one know of a JS library I can use to decode the received JSON at the client side when using @JsonIdentityInfo
or any other better way around this?