asBoolean method
The value as a bool: a boolean, "true" / "false", a number (not
0), false for null and a missing node; anything else gives
defaultValue, or throws a JsonNodeException without one.
Implementation
@override
bool asBoolean([bool? defaultValue]) => switch (value) {
'true' => true,
'false' => false,
_ => super.asBoolean(defaultValue),
};