This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Different behavior of PreserveReferencesHandling.Arrays option with privius versions

description

serializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.Arrays;

List<SomeClass>, where SomeClass has properties SomeProperty and SomeList property which is List<SomeSubClass1>
was serialized to json:
{
"$id": "1",
"$values": [
    {
        "SomeProperty1": "someValue",
        "SomeList": {
            "$id": "2",
            "$values": []
        }
    }
]
}
after update to Newtonsoft.Json" version="7.0.1":
{
"$id": "1",
"$values": [
    {
        "SomeProperty1": "someValue",
        "SomeList": []
    }
]
}

comments