You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to find a way to get in between the moment where the serializer finds something it already serialized, and the moment where it decides to return null.
My data has a lot of references to itself, and a null destroys the linking. Hence when it finds a circular reference I want to do a simple Entity check, and if so serialize only the ID. That way the data structure remains intact, since an property could be null.
I have tried looking in the visitors, and the "XmlSerializationVisitor" has something called "isCircularRef"
This guided me towards the "SerializationContext" where it seems to keep track of the objects in its "$visitingSet"
This is private, and gives me no option remove objects. I also cant extend it, since the visitor checks for the "SerializationContext"
The other problem is that I am looking for the JSON visitor...
At this point I feel like something is wrong, as I need to edit so much files only slightly.
I have been trying to find a way to get in between the moment where the serializer finds something it already serialized, and the moment where it decides to return null.
My data has a lot of references to itself, and a null destroys the linking. Hence when it finds a circular reference I want to do a simple Entity check, and if so serialize only the ID. That way the data structure remains intact, since an property could be null.
I have tried looking in the visitors, and the "XmlSerializationVisitor" has something called "isCircularRef"
This guided me towards the "SerializationContext" where it seems to keep track of the objects in its "$visitingSet"
This is private, and gives me no option remove objects. I also cant extend it, since the visitor checks for the "SerializationContext"
The other problem is that I am looking for the JSON visitor...
At this point I feel like something is wrong, as I need to edit so much files only slightly.
TL:DR
Turn this:
Into this:
The text was updated successfully, but these errors were encountered: