toJson

open fun <T> toJson(object: T): String

Parse pojo to JSON string

Return

String

Parameters

object

Object of generic type

<T>

Generic type


open fun <T> toJson(object: T, clazz: Class<T>): String

Parse pojo to JSON string

Return

String

Parameters

object

Object of generic type

clazz

Class of generic type

<T>

Generic type


open fun <T> toJson(object: T, type: Type): String

Parse pojo to JSON string

Return

String

Parameters

object

Object of generic type

type

Type

<T>

Generic type