@override int fromJson(Object json) => switch (json) { int() => json, double() => json.toInt(), String() => int.tryParse(json) ?? 0, Object() => json as int, };