Would it be possible to add support for the JsonExtensionData attribute?
When modifying a json that is so new, that the model that is serialized to is not yet updated, the JsonExtensionData-Dictionary holds all the non-mapped properties.
When we have the following sequence of messages:
original object (that is serialized to)
public class FooInformation {
[JsonProperty("foo")]
public string Foo { get; set; }
}
The second patch will fail, because FooInformation has no mapping for it. In Newtonsoft.Json, there is a JsonExtensionData attribute that solves the loss of non-mapped fields, and puts those fields in a Dictionary. The /bar-field would be available as an array there, right?
Please consider adding this functionality, as it would add lots of use cases for Json Patch!
Hello Kevin,
Would it be possible to add support for the JsonExtensionData attribute? When modifying a json that is so new, that the model that is serialized to is not yet updated, the JsonExtensionData-Dictionary holds all the non-mapped properties.
When we have the following sequence of messages:
original object (that is serialized to)
original json:
first patch:
second patch:
The second patch will fail, because
FooInformation
has no mapping for it. In Newtonsoft.Json, there is aJsonExtensionData
attribute that solves the loss of non-mapped fields, and puts those fields in a Dictionary. The/bar
-field would be available as an array there, right?Please consider adding this functionality, as it would add lots of use cases for Json Patch!