fromJsonAsT<M> static method

M? fromJsonAsT<M>(
  1. dynamic json
)

Implementation

static M? fromJsonAsT<M>(dynamic json) {
  if (json is M) {
    return json;
  }
  if (json is List) {
    return _getListChildType<M>(
        json.map((dynamic e) => e as Map<String, dynamic>).toList());
  } else {
    return jsonConvert.convert<M>(json);
  }
}