© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
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; }
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 */ ]
}
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.
}
Result: {
  "key1": "value1",
  "key2": "value2",
  // etc.
}


How can I turn this around?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Odata nextlink
C#CC# / help
3mo ago
OData filtering
C#CC# / help
3y ago
OData filtering string variable
C#CC# / help
3y ago