json_serializable.dart
json_serializable.dart copied to clipboard
Support `macros` to serializable JSON
Please consider using macros in future Dart 3 for serialization support, there are several benefits:
- No need to introduce extra packages
- No need to run additional commands to produce auxiliary content
Macros are not officially added to Dart yet, but there is an example here https://github.com/dart-lang/language/blob/master/working/macros/example/lib/json_serializable.dart
It's too early to request this feature, but I think we can discuss feasibility and implementation issues early.
Macros aren't going to happen for Dart v3.0 – but hopefully v3.x. When they show up, I'll be excited to use them!