Adds support for the json_serializable package.
json_serializable
@override Object? toJson(Object? Function(A v) toJsonT) => toJsonT(value);