Skip to content
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

"null" value is deserialized to null instead to "null" #1466

Closed
michibe opened this issue May 10, 2021 · 0 comments
Closed

"null" value is deserialized to null instead to "null" #1466

michibe opened this issue May 10, 2021 · 0 comments
Assignees

Comments

@michibe
Copy link

michibe commented May 10, 2021

A JSON in the form {"propertyName":"null"} is interpreted as the propertyName is null e.g. {"propertyName":null}.

This makes it impossible to send a "null" value as String within JSON.

To Reproduce
Json.parseToJsonElement("""{"propertyName":"null"}""")

Expected behavior
A JSON in the form {"propertyName":"null"} is deserialized as a String with value "null"

Environment

  • Kotlin version: 1.5.0
  • Kotlin platforms: JVM, JS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@qwwdfsad @michibe and others