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

support for all @JsonSeriazable() paramaters #49

Closed
HosamHasanRamadan opened this issue Feb 17, 2020 · 3 comments · Fixed by #81
Closed

support for all @JsonSeriazable() paramaters #49

HosamHasanRamadan opened this issue Feb 17, 2020 · 3 comments · Fixed by #81
Labels
enhancement New feature or request

Comments

@HosamHasanRamadan
Copy link

ex:

@JsonSerializable(fieldRename: FieldRename.snake)
class Person {
 // will convert camal case to snake case automatically 
//  equivelant to JsonKey(name:"first_name")
  String firstName;
}

suggestion:

@SerializableFreezed(fieldRename: FieldRename.snake)
class Person {
  factory Person(String firstName) = _Person;
}
@rrousselGit rrousselGit added the enhancement New feature or request label Feb 17, 2020
@doc-rj-celltrak
Copy link

Thanks for the great package, We're using this instead of built_value, and we're using it with json_serializable. I have a question though...

I need to use this guy: @JsonSerializable(ignoreUnannotated: true)

Is there a way to use ignoreUnannotated or any other class-level json annotations while using @freezed? Currently, it seems to be generating an extra FromJson, when i do this:

@freezed @JsonSerializable(ignoreUnannotated: true)

...which probably makes sense, but it means I have to put @jsonkey(ignore: true) all over the place rather than using @JsonSerializable.

Thanks in advance for any suggestions.

@doc-rj-celltrak
Copy link

Ah, and i just saw this: #50 ... are there any plans in the near future? Thanks!

@rrousselGit
Copy link
Owner

#50 should be pretty simple to do (as it's done already with parameters).
I'm kinda working on other stuff at the moment though.

Feel free to make a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants