asString function
Returns a String for the value at key.
Throws a FormatException if the value cannot be converted.
Implementation
String asString(dynamic json, String key) {
final value = _getJsonValueOrNull(json, key);
return toString(value);
}