Skip to content

Serialising anonymous/immutable types #68

@drewnoakes

Description

@drewnoakes

Is it possible to serialise an anonymous type?

For example:

new { Foo = 1, Bar = "Hello" }

This would be very useful for us.

Unfortunately, GetSerializer<T> doesn't seem to work, presumably as the properties of anonymous types are read only. Because the returned serializer can both serialise and deserialise, it's not possible to build it. However we only need the serialiser bit.

(cc @lufka)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequires or request to feature enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions