C# Dictionaries - not supported?
See original GitHub issueHi,
I’ve been trying to work with models which looks similar to this:
{ "101": "Something", "102": "Something else", "109": "Something else yet again }
My C# model maps this to a Dictionary<int, string>. Am I correct when I say this isn’t supported with your library? The keys in the dictionary are dynamic, so there’s no option to create a model type which matches these.
Edit: Just to clarify, I’m trying to apply a patch in C# using this model, which I haven’t been able to make work. The same patch applied in JS works as expected.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Dictionary .Add not supported C# - Stack Overflow
A Dictionary can be iterated over as collection of key/value pairs, so you can do this: while (condition) { response = // call...
Read more >C# Dictionary with examples
In Dictionary, key must be unique. Duplicate keys are not allowed if you try to use duplicate key then compiler will throw an...
Read more >Dictionaries in Python
Duplicate keys are not allowed. A dictionary maps each key to a corresponding value, so it doesn't make sense to map a particular...
Read more >Dictionary | Apple Developer Documentation
Overview. A dictionary is a type of hash table, providing fast access to the entries it contains. Each entry in the table is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is now supported.
@CRidge the gist that i put is an example how an instatiated obj can be translated into a json patch. The patched doc is being generated from the properties automatically
@kevindockx if you have more information about it, and a resource I can read, I can throw some time and work on it. Thanks