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

Part of https://github.com/google/json_serializable.dart/pull/1155 - see details here. This is just the annotation part of the PR.

## Why Sometimes one wants to parse dart's `DateTime` object only to Date instead of microseconds, but json_serializable does not have an option to specify this. This applies on both...

I successfully achieved dynamic parsing with the help of another parameter in the same JSON. Like this: ```dart @JsonSerializable() class MySpecialModel { ... final DataType type; @JsonKey(fromJson: _dataFromJson, readValue: _dataReadValue,)...

Type: enhancement

I'm using jsonserializable, and having an issue with generics. I read on how to "solve" serialization for class A that has generic type T - but I'm thinking on why...

Hello, I am working with an online/offline app and I need to serialise my data at the app start up. So I have to do a trick with my images....

Cross-posted in https://github.com/rrousselGit/freezed/issues/882, please see description there :)

Please consider using macros in future Dart 3 for serialization support, there are several benefits: 1. No need to introduce extra packages 2. No need to run additional commands to...

Type: enhancement
State: blocked

Now [generated code](https://github.com/google/json_serializable.dart/issues/1286) contains such statement for `ThemeMode` `enum`: ```dart const _$ThemeModeEnumMap = { ThemeMode.system: 'system', ThemeMode.light: 'light', ThemeMode.dark: 'dark', }; ``` So `enum` values are serialized as `String`s but...

Type: enhancement
P3 low

`flutter --version`: ```terminal Flutter 3.8.0-10.1.pre • channel beta • https://github.com/flutter/flutter.git Framework • revision 1a0a03a41d (4 days ago) • 2023-02-16 22:03:58 -0600 Engine • revision 639e313f99 Tools • Dart 3.0.0 (build...

The following code builds, but see the comment for which critical information has to be removed for said build to succeed: ```dart class Base { const Base(); } class BaseConverter...