Package-level declarations

Types

Link copied to clipboard

A singleton provider for Gson.

Functions

Link copied to clipboard
inline fun <T> fromJson(json: JsonElement): T

Parses the specified JsonElement into an object of type T using Gson library.

inline fun <T> fromJson(reader: Reader): T

Parses JSON data from a Reader into an object of type T using the Gson library.

inline fun <T> fromJson(json: String): T

Parses the specified JSON string into an object of type T using Gson library.

inline fun <T> fromJson(json: String, serializer: JsonDeserializer<T>): T

Parses the specified JSON string into an object of type T using Gson library. With additional parameter to add your custom deserializer.

Link copied to clipboard
inline fun <T> Gson.fromJson(json: String): T

Parses the specified string into an object of type T using Gson library.

inline fun <T> Response.fromJson(errorMessage: String = "Response must not be empty."): T

Parses the response body of this Response into an object of type T using Gson.