-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JsonArrayBuilder's unaryPlus extensions don't work for Number? #418
Comments
The overload for jsonArray {
+"foo"
+"bar"
+"baz"
} |
I ended up using |
jsonArray {
+(1 as Number)
} This will work. The problem is that when you only write |
Can we get some movement on this. I was just bitten by it. There's a solution in dev, but it hasn't been merged back into master. In the comments on the commit, |
Using
kotlinx-serialization-runtime:0.10.0
the following code produces an empty array:Being more verbose works as expected:
It seems that https://github.com/Kotlin/kotlinx.serialization/blob/master/runtime/common/src/test/kotlin/kotlinx/serialization/json/serializers/JsonArraySerializerTest.kt lacks tests for the the
unaryPlus
overloads defined inJsonArrayBuilder
, maybe.The text was updated successfully, but these errors were encountered: