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

Added example of how to apply json custom converter in freezed documentation #241

Merged
merged 3 commits into from
Aug 7, 2020
Merged

Added example of how to apply json custom converter in freezed documentation #241

merged 3 commits into from
Aug 7, 2020

Conversation

SandroMaglione
Copy link
Contributor

The PR aims to clarify two features from #240 and #232.

It adds two code examples on how to apply the custom converter decorator MyResponseConverter already present inside the documentation. Specifically, one example illustrates how to apply the decorator by passing it as a constructor parameter, while the second one shows that the converter works also on a List parameter.

It also adds a note below it to clarify that, in order to serialize nested list of freezer objects, you are supposed to either specify a @JsonSerializable(explicitToJson: true) or change explicit_to_json inside your build.yaml file (taken from here).

Note: The PR introduces a repetition. The reference to build.yaml to define some custom json_serializable flags is present both inside the PR and at the very bottom of the original documentation. I think the note may be helpful right below the json_serializable section to clarify the concepts explained above.

@rrousselGit
Copy link
Owner

Thanks!

@rrousselGit rrousselGit merged commit eba2558 into rrousselGit:master Aug 7, 2020
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 this pull request may close these issues.

2 participants