decodeJsonTree method

  1. @override
String decodeJsonTree(
  1. Object? json
)
override

Converts json (any JSON tree) to an instance of T.

Throws ArgumentError if the JSON does not match.

Implementation

@override
String decodeJsonTree(Object? json) {
  if (json is String) {
    return json;
  }
  throw JsonDecodingError.expectedString(json);
}