c# - Ignore capitalization of letters set through JsonPropertyAttribute -
i have class 3 simple properties:
public class newcard { [jsonproperty( "name" )] public string name { get; set; } [jsonproperty( "desc" )] public string desc { get; set; } [jsonproperty( "idlist" )] public string idlist { get; set; } }
i expected result this:
{"name":"a name","desc":"","idlist":"listid"}
unfortunately, result looks this:
{"name":"a name","desc":"","idlist":"listid"}
the remote service rejects json, need have them lowered. json.net version: 4.5.6 downloaded using nuget.
i result expect when serialize as
var json = jsonconvert.serializeobject(new newcard() {name="a name",desc="a desc",idlist="ids" });
Comments
Post a Comment