toJsonValue

fun toJsonValue(@Nullable() value: T): Any

Encodes {@code value} as a Java value object comprised of maps, lists, strings, numbers,booleans, and nulls.

Values encoded using {@code value(double)} or {@code value(long)} are modeled with thecorresponding boxed type. Values encoded using {@code value(Number)} are modeled as a for boxed integer types (Byte, Short, Integer, and Long),as a Double for boxed floating point types (Float and Double), and as a BigDecimal for all other types.