https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

routis

12/07/2023, 9:30 PM
Given that kotlin lacks a type for big integers, is there a way to output a
ByteArray
that holds the big integer bytes to a JsonPrimitive (kotlinx.serialization) in common main?
k

kevin.cianfarini

12/07/2023, 9:34 PM
j

Jan Holešovský

12/08/2023, 6:54 AM
And this, if you want a BigDecimal etc. drop-in replacement for Kotlin/Native on iOS: https://github.com/kendy/Kotlin-Native-BigDecimal
👍 1
r

routis

12/08/2023, 12:10 PM
Thanks for the tips @Jan Holešovský & @kevin.cianfarini Used the ionspin implementation. Works awesomly. Especially for kotlinx serialization, ionspin' s serializers were not suitable for my case (wanted to output big integers as JSON numbers). Hopefully, kotlinx.serialization provides function
JsonUnquotedLiteral
4 Views