We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, i just wanna ask something like, sometime our backend dev return the response like this
[ { "data" : "data1"}, { "data" : "data2"}, { "data" : "data3"} ]
how to handle that with JsonSerializable, a list data without key, thankyou
The text was updated successfully, but these errors were encountered:
It could be work well with custom wrapper
class ListWrap { List<dynamic> list factory ListWrap.fromJson(List<dynamic> json) => _$ListWrapToJson({"list": json}); List<dynamic> toJson() => _$ListWrapToJson(this)["list"] }
But will not work with freezed rrousselGit/freezed#451
freezed
may consider add a pair option fromJson, toJson to @JsonSerializable or even just @JsonKey(inline:true)
fromJson, toJson
@JsonSerializable
@JsonKey(inline:true)
Sorry, something went wrong.
Are there any updates to this problem?
Can't find any mention in the internet about serializing JSON with root list structure.
or even just @JsonKey(inline:true)
This looks great for me.
No branches or pull requests
Hi, i just wanna ask something like, sometime our backend dev return the response like this
[ { "data" : "data1"}, { "data" : "data2"}, { "data" : "data3"} ]
how to handle that with JsonSerializable, a list data without key, thankyou
The text was updated successfully, but these errors were encountered: