fromJsonRepresentation

inline fun <T> fromJsonRepresentation(json: Json): T

Maps given Json to type T.

T can be one of the following:

  • String

  • Number and its subclasses

  • Boolean

  • Enum class

  • Any

  • Json and its subclasses

  • T?

  • List, Sequence, Iterable, Collection, Map

  • class with primary constructor with args of type T1, T2, ... Tn

Throws

if mapping error was occurred