If we want to provide a truly universal kotlinx serialization format, we need to cover ASN.1 REAL number encoding and decoding, in all variants supported by the DER. As a first step, just supporting the encoding that maps easiest to Kotlin's Doubleis sufficient.
The real issue here is testing. BC does not support REAL numbers and the online tools also don't implement a parser we could hijack. Even openssl just print prim: REAL
If we want to provide a truly universal kotlinx serialization format, we need to cover ASN.1 REAL number encoding and decoding, in all variants supported by the DER. As a first step, just supporting the encoding that maps easiest to Kotlin's
Double
is sufficient.The real issue here is testing. BC does not support REAL numbers and the online tools also don't implement a parser we could hijack. Even openssl just print
prim: REAL