I'm having trouble using the serialization process for serverpod. Here's the repo if you'd like to take a look: https://github.com/fhir-fli/fhirpod. All of my classes are freezed, and I've adjusted all of the fromJson to include the serializationManagers. That has no errors. When I try to generate code, if I remove json_serializable from the pubspec and all of the part 'file.g.dart'; code, then it generates fine. However, it doesn't generate the toJson() files that are required.
However, when I do include the json_serializable to generate the toJson() methods, I get this error message:
[SEVERE] json_serializable on lib/r4/resource_types/financial/general/general.dart:
Expecting a `fromJson` constructor with exactly one positional parameter. The only extra parameters allowed are functions of the form `T Function(Object?) fromJsonT` where `T` is a type parameter of the target type.
package:fhir/r4/special_types/special_types.dart:483:16
I'm using serverpod_serialization: ^1.1.0.
Just hoping someone else had a similar experience and had found a solution.