json method

  1. @override
Future<Object?> json()

Implementation

@override
Future<Object?> json() async {
  // We don't call `_delegate.json()` directly, as it decodes the JSON
  // from JS `JSON.parse`, which does not translate all values back to Dart
  // correctly (e.g. a List is not translated to a JsArray).
  final text = await _delegate.text();
  return jsonDecode(text);
}