decode static method

Mapping? decode(
  1. String json
)

Decodes a JSON string back to a map.

json is the JSON string to deserialize.

Returns the decoded map, or null if decoding fails.

Implementation

static Map? decode(String json) {
  final info = coder.decode(json);
  assert(info is Map, 'json error: "$json"');
  return info?.asMap();
}