extractIntValue method
Extracts and validates an int value. Throws FormatException if value is not a number or not an int.
Implementation
@override
int extractIntValue(dynamic value, String errMsg) {
if (value is! num) {
throw FormatException(
"[JsonConverter] expected int, got ${value.runtimeType} $errMsg",
);
}
if (value is! int) {
throw FormatException(
"[JsonConverter] expected int, got ${value.runtimeType} $errMsg",
);
}
return value;
}