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

Support `macros` to serializable JSON

Open medz opened this issue 1 year ago • 4 comments

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 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.

medz avatar Feb 17 '23 17:02 medz

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!

kevmoo avatar Feb 26 '23 23:02 kevmoo