 | DuplicatePropertyNameHandling Enumeration |
Specifies how duplicate property names are handled when loading JSON.
Namespace:
Newtonsoft.Json.Linq
Assembly:
Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntaxpublic enum DuplicatePropertyNameHandling
Members
| Member name | Value | Description |
---|
| Replace | 0 |
Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
|
| Ignore | 1 |
Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
|
| Error | 2 |
Throw a JsonReaderException when a duplicate property is encountered.
|
See Also