Hopefully someone can help me with the following inconsistency occurring in a large JSON file that I am attempting to deserialize using Newtonsoft.Json.
One of the proper
the easiest way (not necessarily the cleanest) would be to manually alter the string before deserialising -
jsonString = jsonString.replace("\"roles\": {", "\"rolesContainer\": {");
jsonString = jsonString.replace("\"roles\":{", "\"rolesContainer\": {");
and then in your main code you would have both rolesContainer and roles as fields - and then merge them after
public List roles { get; set; }
public RoleContainer rolesContainer { get; set; }
public class RoleContainer {
Public List roles;
}
it's dirty, but it should work