json property

dynamic get json

Implementation

dynamic get json {
  if (body.isEmpty) return null;
  try {
    return jsonDecode(body);
  } on FormatException {
    throw TestClientAssertionError(
      'Response body is not valid JSON: ${_truncated(body)}',
    );
  }
}