asMap<T, S> function

Map<T, S> asMap<T, S>(
  1. dynamic json,
  2. String key
)

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);
}