C#C
C#2y ago
Stefan

OData Dictionary Response

Since I am not very familiar with OData yet, I have resorted to asking this question here:

Suppose I have a model with a property

public Dictionary<string,string> Data { get; set; }


Using OData, the response looks like this:

Result: {
  Keys: [ /* all keys in list form here */ ],
  Values: [ /* all values in list form here */ ]
}


though I expected it to be serialized like this:

Result: {
  "key1": "value1",
  "key2": "value2",
  // etc.
}


How can I turn this around?
Was this page helpful?