Kevin Moore
Kevin Moore
Yup. The `typedef` is effectively erased. I can't go back to the typedef when I generate the code. Maybe @scheglov has an idea?
That's a tricky one. I could imagine adding a special-case annotation for a field – something like "serialize me, even though I'm not in a ctor". An interesting feature request....
Plan to fix the tests here, @AlexV525 ?
@AlexV525 – yup, you'll want to rebase!
@AlexV525 – we now have merge conflicts.
Thank you! On Thu, Sep 29, 2022 at 12:21 AM Alex Li ***@***.***> wrote: > Thanks, Kevin @kevmoo ! > > — > Reply to this email directly, view it...
@andcea – I use Dart's notion of nullability. I cannot support an arbitrary `Option` type like you have. The solution would be to use ```dart @JsonKey(includeIfNull: false) final String? maybeLastName;...
Understood. It's a bit of a weird case, honestly. Will need to ponder.
@edlman do you need to create this class from Json? If not, just put `@JsonSerializable(createFactory: false)` on the class and you should be good!
So you want to create this class from `JSON` in one shape, but have it generate JSON in another shape?