https://kotlinlang.org logo
Title
c

coder82

05/15/2019, 11:59 AM
I am trying to use the kotlin deserializer without strict mode but it still complains about fields I don't declare in the data class but are present in the JSON.
Because of that I have to get the data into a string and parse it in a second time manually with the parser, what's the correct what to instruct the library to not be strict?
j

Jonas Bark

05/15/2019, 12:14 PM
wouldn't it be
install(JsonFeature) {
                this.serializer = KotlinxSerializer(JSON.nonstrict)
            }
instead?
👍 1
r

ribesg

05/15/2019, 12:37 PM
Yeah you’re creating a serializer but you’re not doing anything with it
c

coder82

05/15/2019, 12:46 PM
whoops
gosh still need to get used to DSL coding
ofc need to assign it
it must be that for sure
brb
duh....
ofc it's that!
😆
thx