decodeJson abstract method

Future decodeJson({
  1. Object? reviver(
    1. Object? key,
    2. Object? value
    )?,
})

Reads and decodes content body as a JSON object, returned in a future.

The result is an object tree as parsed by the standard json.decode() of the dart:convert package.

An optional reviver function is applied when decoding json string data. See JsonCodec of the dart:convert package for more information.

Throws ClientException if content body cannot be decoded as JSON.

Implementation

Future<dynamic> decodeJson({
  Object? Function(Object? key, Object? value)? reviver,
});