KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a JSON: { "data": { "A": 5, "B": 6 }, "foo": "foo", "bar": "bar" } I need to deserialize data into a class: public Dictionary<MyEnum, int> Data { get; set; } public string Foo { get; set; } public string Bar { get; set; } But MyEnum values are CodeA , and CodeB instead of simply A and B respectively. I have a custom Converter that can handle conversion. But how do I specify a JsonConverter to use with Dictionary keys?
Tags (comma-separated)
Save Edits
Cancel