parseAs

inline fun <T> Response.parseAs(transform: (String) -> String): T(source)

Parse and serialize the transformed response body as the type .

Since

extensions-lib 14

Parameters

transform

transformer function that does required changes to the response body.


@ExperimentalSerializationApi
inline fun <T> Response.parseAs(): T(source)

Parse and serialize the response body as the type .

This function uses okio utilities instead of converting the response body to a String, so you may have a small performance gain over Response.parseAs(transform), mainly in large responses.

Since

extensions-lib 14


inline fun <T> String.parseAs(transform: (String) -> String): T(source)

Parses and serializes the transformed String as the type .

Since

extensions-lib 14

Parameters

transform

transformer function that does required changes to the String.


inline fun <T> String.parseAs(): T(source)

Parses and serializes the Json String as the type .

Since

extensions-lib 14