Open medz opened 1 year ago
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!
Any news on this?
@xVemu Although it may not be appropriate to post here, I would like to say that the Dart team created the 'JSON' package and used macros to complete JSON serialization.
But although the 'json' and 'json_serializable' packages are competitive, they ultimately belong to Google, but they belong to different teams.
I believe that once the macro is released, the Dart team's' JSON 'package will be officially available. Perhaps the Google team will discard the 'json_serializable' after discussion`
I believe that once the macro is released, the Dart team's' JSON 'package will be officially available. Perhaps the Google team will discard the 'json_serializable' after discussion`
Only if the "json" package supports enums and all the JsonKey features
Please consider using macros in future Dart 3 for serialization support, there are several benefits:
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.