I have been using NewtonSoft JSON Convert library to parse and convert JSON string to C# objects. But now I have came across a really awkward JSON string and I am unable to
While the dictionary is the best solution for the specific case you had, the question you asked could also be interpreted as:
how do I deserialize objects with property names that cannot be used in C#?
For example what if you had
{
"0": "04:15",
"zzz": "foo"
}
Solution: use annotations:
public class Item
{
[JsonProperty("0")]
public string AnyName { get; set; }
[JsonProperty("zzz")]
public string AnotherName { get; set; }
}