fromJson<T> method

T? fromJson<T>()

json数据转原始数据类型

Implementation

T? fromJson<T>() {
  var str = this;
  if (str == null || str.isEmpty) {
    return null;
  }
  return jsonDecode(str);
}