asMap<T, S> function
Returns a Map for the value at key
.
Throws a FormatException if the value is not a map.
Implementation
Map<T, S> asMap<T, S>(dynamic json, String key) {
final value = _getJsonValueOrNull(json, key);
return toMap(value);
}