Skip to content

Deserialization support for more implementing types in JsonSerializer #30646

@layomia

Description

@layomia

dotnet/corefx#39001 added support for types derived from BCL collections that are natively supported by the serializer, with the exception of read-only types, and types that do not implement any of:

  • IList
  • ICollection<T>
  • Stack<T>
  • Queue<T>
  • IDictionary
  • IDictionary<string, TValue>

Some examples are public class StackWrapper : Stack { } and StringValues. The serializer throws a NotSupportedException when a deserialization attempt is made for these types.

More investigation/design needs to be done, but these types can be supported by using reflection to probe for the right constructors to populate them if we determine to support them in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Text.JsonenhancementProduct code improvement that does NOT require public API changes/additionsjson-functionality-docMissing JSON specific functionality that needs documenting

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions