Hot Chocolate: Autogenerated type for IDictionary becomes List #7268
Answered
by
eduardocp
nurbolnygmanov
asked this question in
Q&A
-
TL.DR. I have class with dictionary and query as below
is it ok that above setup generates below type, and what is the reason behind it?
and retuned json is
|
Beta Was this translation helpful? Give feedback.
Answered by
eduardocp
Jul 22, 2024
Replies: 1 comment
-
Yes. This is the expected behavior. Dictionaries uses |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nurbolnygmanov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes. This is the expected behavior. Dictionaries uses
KeyValuePair<TKey, TValue>
and this is the structure that is converted. I think you can customize this by creating Custom Converters