json_serializable.dart
json_serializable.dart copied to clipboard
Generates utilities to aid in serializing to/from JSON.
Feature request related to [Enhanced enums](https://github.com/dart-lang/language/blob/master/accepted/future-releases/enhanced-enums/feature-specification.md) while using [JsonValue](https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonValue-class.html) 1. Currently, we would have to declare the value twice per Enum value (to allow this package to serialize/deserialize the Enum...
Hello, sometimes i need to have a list of different names for values @JsonKey(name: ['firstName' , 'altertativeName']) codogen json['firstNane'] ?? json['altertativeName']
Adds the option to `JsonKey` to include fields in `toJson` that are not used in the factory (`fromJson`). Related issues: #24, #891
I am very surprised I can't serialize a basic private field, I guess it is by design because as soon as I make it public, it works well. I have...
The current serialization uses `toIso8601String`, which results in different behavior from the web and other platforms since the web does not have micro seconds informations. so on the web you...
I have a scenario where data could be a dynamic map with values or an empty array, is there any annotation method to check null or isEmpty. ``` class myModel{...
When a field refers to a `typedef`'d type, the generated code uses the original type name rather than its alias. However, if the original type isn't currently imported, the generated...
This PR adds a feature to allow non-serialisable data to be passed into fromJson and ignored in toJson. Syntax and an example use case is discussed in #780. This is...
Hello @kevmoo Have you considered adding a level of indirection for getting rid of the boilerplate that json_serializable currently requires? The rough idea is to instead of having to annotate...
Proposal: Update explicitToJson:false to use still be lazy but return a custom collection instance
The current behavior of `explicitToJson: false` seems problematic, as the output of `toJson` does not respect the JSON contract – which is allowing only List/Map/num/bool/String While `dart:convert` supports it, there...