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

JSON <-> Props to Entity #8

Closed
azu opened this issue Oct 5, 2018 · 0 comments · Fixed by #9
Closed

JSON <-> Props to Entity #8

azu opened this issue Oct 5, 2018 · 0 comments · Fixed by #9

Comments

@azu
Copy link
Member

azu commented Oct 5, 2018

We have defined these.

  • JSON
  • Props
  • Entity
    • Entity ∋ Props

Current Converter is between JSON <-> Entity.
Maybe, Conveterting JSON <-> Props that is more reasonable?

JSON <-> Props can be represent as mapping object.
It allow to write conveter in the same position by propery name.

const convertMap: Converter<JSON, Props> = {
  propertyName: [JSONValue => PropsValue, PropsValue => JSONValue]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant