[android-components](../index.md) / [mozilla.components.service.digitalassetlinks.ext](index.md) / [parseJsonBody](./parse-json-body.md)

# parseJsonBody

`inline fun <T> `[`Response`](../mozilla.components.concept.fetch/-response/index.md)`.parseJsonBody(crossinline parser: (`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`) -> `[`T`](parse-json-body.md#T)`): `[`T`](parse-json-body.md#T)`?` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/service/digitalassetlinks/src/main/java/mozilla/components/service/digitalassetlinks/ext/Response.kt#L13)

Safely parse a JSON [Response](../mozilla.components.concept.fetch/-response/index.md) returned by an API.

