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

Make compatible with freezed package

Open mkranus opened this issue 2 years ago • 5 comments

Freezed package requires the JsonKey annotation to be inserted into the constructor, which is then copied to the generated classes. But currently this use generates a warning, and this PR adds an additional TargetKind so the warning is no longer generated.

mkranus avatar Aug 06 '21 13:08 mkranus

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Aug 06 '21 13:08 google-cla[bot]

@googlebot I signed it!

mkranus avatar Aug 06 '21 13:08 mkranus

@JsonSerializable factory ...

-> The annotation 'JsonSerializable' can only be used on classes.

No TargetKind for factory.

vi-k avatar Sep 09 '21 04:09 vi-k

See https://github.com/rrousselGit/freezed/issues/474 and https://github.com/dart-lang/sdk/issues/46844

vi-k avatar Sep 09 '21 04:09 vi-k

Any update on this one @mkranus

princeteck avatar Oct 17 '21 23:10 princeteck