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

Migrate readme to v3 #1186

Closed
snapsl opened this issue Mar 1, 2025 · 4 comments · Fixed by #1188
Closed

Migrate readme to v3 #1186

snapsl opened this issue Mar 1, 2025 · 4 comments · Fixed by #1188
Assignees
Labels
documentation Improvements or additions to documentation needs triage

Comments

@snapsl
Copy link
Contributor

snapsl commented Mar 1, 2025

The readme currently contains many examples that are not compatible with the v3 release.

In many cases the "abstract" is missing or the old factory syntax mixes with the new class syntax.

@snapsl snapsl added documentation Improvements or additions to documentation needs triage labels Mar 1, 2025
@lume-code
Copy link

It appears that freezed does not generate fromJson/toJson using the previous syntax anymore. That and not knowing the course moving forward prevented me from upgrading to v3. Adding @JsonSerializable annotation didn't help either per the migration_guide.md documentation.

@snapsl
Copy link
Contributor Author

snapsl commented Mar 2, 2025

@lume-code Use the abstract or sealed keyword respectively for factory constructors as mentioned at the beginning of the migration guide. The @JsonSerializable annotation is used for the new classic class syntax.

@lume-code
Copy link

@snapsl thanks, It was already sealed but same results.

@snapsl
Copy link
Contributor Author

snapsl commented Mar 2, 2025

Could be a bug. Please fill a new issue containing your freezed class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants