-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
When serializing to Json, an exception is thrown if the default contract resolver is not used.
Code:
Newtonsoft.Json.JsonConvert.DefaultSettings = () => new JsonSerializerSettings{
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
Review r = new Review {
Comment = "fdsdf"
};
r.ToIndentedJson().Dump();
Exception:
A member with the name 'comment' already exists on 'MXTires.Microdata.Review'. Use the JsonPropertyAttribute to specify another name.
The ToJson methods should specify the contract resolver explicitly to avoid this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels