json_serializable.dart icon indicating copy to clipboard operation
json_serializable.dart copied to clipboard

Generates utilities to aid in serializing to/from JSON.

Results 161 json_serializable.dart issues
Sort by recently updated
recently updated
newest added

Hi Currently `JsonKey` annotation have `ignore` parameter, but it's generalized for both `fromJson` and `toJson`. The idea is to have a control over which fields can be serialized via `toJson`...

**Is your feature request related to a problem? Please describe.** PATCH REST requests, for example, are hard to do. Photo's `null` is meaningful. If we send `photo == null`, then...

Type: enhancement

Hi thanks for the wonderful lib! I would appreciate it if the generated `.g.dart` code could be 120-character in width. I can make a PR for this. How to implement...

Type: enhancement

If a field is private and the `@JsonKey` annotation field `fromJson` is set, the serializer ignores this. Here my example model class: ```dart part 'comment.g.dart'; @JsonSerializable() class Comment { String...

Type: enhancement
pkg:json_serializable

I have a dart object that includes a field of type `Money`, which itself is composed of `amount` and `currency`: ``` @JsonSerializable() class Account { final String id; final String...

```shell $ flutter --version Flutter 2.8.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision cf44000065 (9 days ago) • 2021-12-08 14:06:50 -0800 Engine • revision 40a99c5951 Tools • Dart 2.15.0...

Just had some fun figuring out why this fails: ```dart import 'package:equatable/equatable.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:json_annotation/json_annotation.dart'; part 'enum.g.dart'; enum A { a, b } @JsonSerializable(anyMap: true, explicitToJson: true) class B...

Hi thanks for the lib! I am using protobuf extensively to replace JSON. For example, instead of returning a json from server, a protobuf is returned. Thus, it is very...

![image](https://user-images.githubusercontent.com/10706610/145462665-3e39e739-bfd7-4783-9a0e-c79d42812018.png) Here is my firebase collection, I add a map list to items. ![image](https://user-images.githubusercontent.com/10706610/145462757-fab983d9-6811-470f-8f0a-811fa1e79a0e.png) This is the error message from the console. ![image](https://user-images.githubusercontent.com/10706610/145462801-b4a576ee-c708-4ec8-93c1-36ebb2c19880.png)