Encodes a value to JSON-compatible Dart objects.
@override String encode(PlanId value) => value.toJson();