fromJson static method

Any fromJson(
  1. Map<String, dynamic> json
)

Implementation

static Any fromJson(Map<String, dynamic> json) {
  final type = json.valueAsString<String>('@type', acceptSnakeCase: true);
  final j = json.clone().notNullValue;
  j.remove("@type");
  if (j.isEmpty) return AnyBinary(typeUrl: type);
  return AnyJson(typeUrl: type, value: j);
}