toJsonValue

fun toJsonValue(@Nullable value: T): Any

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

Values encoded using value(double) or value(long) are modeled with the corresponding boxed type. Values encoded using 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.