I need to implement a custom functionality a bit similar Dictionary but with the possibility to insert duplicate keys. So basically what I need from Dictionary is the possibility to serialize the object as the following JSON:
{
"One":"Value 1",
"Two":"Value x",
"One":"Value 10",
"Two":"Value 100"
}
As you can see above I have duplicate keys ...
Any advice? The whole point is the JSON output in the format above
Edit:
KeyValuePair<string,string>
doesn't work!
This is the outcome:
[{"Key":"One","Value":"Two"},{"Key":"One","Value":"Two"}]
As you can see serialized as JSON will brink the Key and Value keywords in place where a Dictionary will replace the Key with the actual key-value and the value with the value provided.