@override String valueFromJson(json) { return switch (json) { String str => str, _ => throw Exception('Invalid value'), }; }