• Nikky

    Nikky

    3 years ago
    just wanted to ask.. the bug where automatically finding the serializers for types in another submodule, is there a better solution than adding
    @Serializable(with=)
    ? that also does not work with lists afaik
    Nikky
    s
    10 replies
    Copy to Clipboard
  • f

    fkrauthan

    3 years ago
    Forwarding my question and thread here as this should be the better place for it.
    f
    s
    2 replies
    Copy to Clipboard
  • ValV

    ValV

    3 years ago
    Why
    kotlinx.serialization
    causes an error with Maven build? https://gist.github.com/ValV/bfa622d9d4303c96dd523d3c3481ae9d I have parent pom + 2 child pom s in the project
    ValV
    s
    2 replies
    Copy to Clipboard
  • r

    r4zzz4k

    3 years ago
    Is there any technical reason
    kotlinx-serialization-runtime-native
    isn't provided for
    linux
    and other targets aside from
    ios
    /
    macos
    or it's just nobody checked if it's working as-is?
    r
    s
    3 replies
    Copy to Clipboard
  • Nikky

    Nikky

    3 years ago
    something else.. could you move or push a additional artifact to
    kotlinx-serialization:kotlinx-serialization
    ? that would be the default location gradle looks for when adding the kotlinx repo to
    pluginManagement
    and resolving
    id("kotlinx-serialization") version Versions.serialization
    i guess thats just a concern for pre 1.3, but the same thing basically for all the gradle plugins in kotlinx (not sure if there are or how many)
    Nikky
    s
    2 replies
    Copy to Clipboard
  • t

    thevery

    3 years ago
    @sandwwraith is there any updated doc on writing custom serializer? This one uses deprecated code and doesn't compile: https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/custom_serializers.md#customizing
    t
    s
    8 replies
    Copy to Clipboard
  • t

    thevery

    3 years ago
    Am I right that
    @Polymorphic
    doesn't work with generics well?
    class ParserTest {
        open class Field
    
        @Serializable data class FieldB(val a: String, val b: Int) : Field()
    
        @Serializable data class FieldC(val a: String, val b: Int) : Field()
    
        @Serializable data class Data(@Polymorphic val a: List<Field>)
    
        @Test
        fun testPoly() {
            val obj = JSON.parse<Data>("""{"a":[{a:"a", b: 1}]}""")
            println("obj = ${obj}")
        }
    }
    produces
    java.lang.IllegalArgumentException: JSON at 6: Expected '[, kind: kotlinx.serialization.UnionKind$POLYMORPHIC@33e5ccce'
    t
    s
    4 replies
    Copy to Clipboard
  • ValV

    ValV

    3 years ago
    I have
    @Serializable data class MyData (val name: String, val value: Any)
    and works pretty good with
    MyData.serializer()
    until
    value
    is
    java.util.Date
    . What is the better way to solve it? Write custom serializer like in https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/custom_serializers.md ?
    ValV
    4 replies
    Copy to Clipboard
  • t

    thevery

    3 years ago
    Finally I've got working version for JVM but native fails with
    exception: kotlin.NotImplementedError: An operation is not implemented: Serializable classes with inheritance
    . It there any workaround for this?
    t
    1 replies
    Copy to Clipboard
  • Nikky

    Nikky

    3 years ago
    i am upgrading from 1.2 to 1.3 and IDE and gradle tell me everything is broken, did
    serialClassDesc
    or annotations renamed too ?
    Nikky
    1 replies
    Copy to Clipboard