tryDecodeJson

inline fun <T> String.tryDecodeJson(jsonInstance: Json? = null): T?

Decode string to an entity of type T or return null if json is invalid

Return

the decoded object of type T

Parameters

jsonInstance

the custom json object used to decode the specified string