Also, I found something interesting. I initially w...
# serialization
q
Also, I found something interesting. I initially wrote the test like this (see code snippet attached), but it failed with the following error message:
Copy code
java.lang.AssertionError: 
Expected :{"primitive": 0}
Actual   :{"primitive":0}
As you can see, there's an additional space between the semicolon and the value when I serialize the json using
json { "primitive" to 0 }.toString()
, compared to
JSON.stringify(serializer, obj)
. Is this intentional ? It seems to me that both should have the exact same output
v
Is this intentional?
Not really. Filed https://github.com/Kotlin/kotlinx.serialization/issues/323