JSON (de)serializer - add support for object references (original) (raw)
To correctly serialize and deserialize object graphs from Entity Framework we need object references (something like this: https://www.newtonsoft.com/json/help/html/PreserveObjectReferences.htm).
Simple example: we want to serialize orders. Orders have references to customers. Two different orders have a reference to exactly the same customer. After deserialization we have to have one customer object and not two different objects with exactly the same property values.
Without this functionality new JSON (de)serializer is in my opinion almost useless in real world business application. Think about Blazor.
To correctly serialize object graphs from Entity Framework we also need support for graph cycles, see here: #29129