So I'm trying to serialize a Dictionary
:
Dictionary<string, List<MyClass>>
My class contains a property called MyPropery
However the string comes out as "{"List1":[{"MyProperty":[]}]}"
How would I be able to make it convert to {"List1":["MyClass":{"MyProperty":[]}]}
["name":"value"]
is invalid JSON. You can't have property names in an array[]
, just in an object{}
.JSON
what you want asoutput
is itself an invalidJSON