Add support for serializing types that implement IDictionary<string, object>#38512
Conversation
JeremyKuhne
left a comment
There was a problem hiding this comment.
Just a nit, otherwise looks good.
steveharter
left a comment
There was a problem hiding this comment.
One comment around the original code - please look at history and see why that code was added to make sure we don't break something else. Thanks
See https://github.com/dotnet/corefx/pull/37300/files#r280149022. |
| public static void DictionaryOfObject() | ||
| { | ||
| { | ||
| IDictionary obj = JsonSerializer.Parse<IDictionary>(@"{""Key1"":1}"); |
There was a problem hiding this comment.
Why remove the IDictionary test case rather than just adding the Dictionary<string, object> one?
…object> (dotnet/corefx#38512) * Add support for serializing types that implement IDictionary<string, object> * Add test for string to string IDictionary * fixup * Address review feedback * Rename dict -> dictionary Commit migrated from dotnet/corefx@e2e5fb2
This fixes https://github.com/dotnet/corefx/issues/38372. cc @davidfowl @MarcoRossignoli
To-do: Extend support such that we don't have to indicate the implemented type (https://github.com/dotnet/corefx/issues/38521) i.e
This PR also adds support for (de)serializing
IDictionary<string, object>.