readAsJson method

Future<ResourceTry<Map<String, dynamic>>> readAsJson()

Reads the full content as a JSON object.

Implementation

Future<ResourceTry<Map<String, dynamic>>> readAsJson() async =>
    (await readAsString(charset: Charsets.utf8))
        .mapCatching((it) => json.decode(it));