jw
09/13/2018, 3:13 PMNikky
09/14/2018, 10:41 AMjosephivie
09/20/2018, 11:34 PMsandwwraith
09/21/2018, 2:38 PMdecodeElementIndex
indeed produces element index. You need to switch over it and then select proper property to decodehiperbou
09/26/2018, 3:01 PMvoddan
09/27/2018, 12:08 PMkotlinx-gradle-serialization-plugin:0.8.1-rc13
in the reposkartikpatodi
10/02/2018, 8:23 PMtylerwilson
10/02/2018, 8:39 PMthevery
10/03/2018, 3:59 PMwcaokaze
10/04/2018, 12:32 PMchristophsturm
10/04/2018, 1:49 PMturansky
10/04/2018, 9:18 PM{
"data": [
{
"id": "x1_1",
"type": "x1"
},
{
"id": "x2_1",
"type": "x2",
"children": [
{
"id": "y1_1",
"type": "y1"
},
{
"id": "y2_1",
"type": "y2",
"connectedItems": [
"x1_1"
]
}
}
]
}
Data classes
interface X {
val id: String
}
interface Y {
val id: String
}
data class D1(data: Array<X>)
data class X1(id): X
data class X2(id, children: Array<Y>): X
data class Y1(id): Y
data class Y2(id, connectedItems): Y
If there any possibility to realize deserialization for this case (according type
field)?Nikky
10/06/2018, 5:20 PMJonas Bark
10/09/2018, 6:18 PMValV
10/10/2018, 11:47 AMkotlinx.serialization
? I have installed IDEA plugin, added and updated Maven repositories, but
<artifactId>kotlinx-maven-serialization-plugin</artifactId>
<version>${serialization.version}</version>
are not foundNikky
10/10/2018, 5:18 PM@Serializable(with=)
?
that also does not work with lists afaikfkrauthan
10/10/2018, 6:41 PMtheodorosploumis
10/11/2018, 8:56 AMr4zzz4k
10/12/2018, 2:53 PMkotlinx-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?Nikky
10/14/2018, 8:49 PMkotlinx-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)thevery
10/17/2018, 10:34 AMthevery
10/17/2018, 1:46 PM@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'
ValV
10/18/2018, 4:27 PM@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 ?thevery
10/18/2018, 11:22 PMexception: kotlin.NotImplementedError: An operation is not implemented: Serializable classes with inheritance
. It there any workaround for this?Nikky
10/19/2018, 8:47 AMserialClassDesc
or annotations renamed too ?pablisco
10/20/2018, 7:26 AMNikky
10/20/2018, 9:52 AMpablisco
10/20/2018, 5:14 PMjcechace
10/22/2018, 12:35 PMjcechace
10/22/2018, 3:54 PMPolicySerializer.list
does the right thing, however I need to figure out how to register itjcechace
10/22/2018, 3:54 PMPolicySerializer.list
does the right thing, however I need to figure out how to register itNikky
10/22/2018, 4:26 PM