encodeToHexString

Serializes and encodes the given value to byte array, delegating it to the BinaryFormat, and then encodes resulting bytes to hex string.

Hex representation does not interfere with serialization and encoding process of the format and only applies transformation to the resulting array. It is recommended to use for debugging and testing purposes.

Throws

in case of any encoding-specific error

if the encoded input does not comply format's specification