Skip to content

TypeFlattener for nested types #98

@buybackoff

Description

@buybackoff

TypeFlattener already works quite well for flat structures. Buttwo enhancements are needed:

  1. Check if a field is a primitive and keep its value unchanged if it is. Otherwise, check if the type implements IConvertible and convert it according to the GetTypeCode() returned value. If not IConvertible, call ToString(). Spreads' primitive types must implement IConvertible or override ToString() (ToString() override is always needed to avoid boxing).

  2. Recursive flattening. Need to decide if IConvertible takes priority over expanding nested non-primitive types. (some logic with attribute presence or custom attributes could apply).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions