Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeFlattener for nested types #98

Open
buybackoff opened this issue Mar 23, 2017 · 0 comments
Open

TypeFlattener for nested types #98

buybackoff opened this issue Mar 23, 2017 · 0 comments

Comments

@buybackoff
Copy link
Member

buybackoff commented Mar 23, 2017

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant