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

Support primitives (ints, strings, JsonLiterals, etc) on a top-level #465

Closed
wants to merge 2 commits into from

Conversation

sandwwraith
Copy link
Member

…when saving/restoring JSON AST

Fixes #451

@sandwwraith sandwwraith requested a review from qwwdfsad May 21, 2019 14:16
deserializer.descriptor
.also { desc -> require(desc.isNullable) { "Read JsonNull and expected nullable descriptor, but has $desc" } }
@Suppress("NULL_FOR_NONNULL_TYPE")
return null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantically, it is an unchecked cast: @Suppress("UNCHECKED_CAST") return null as T
I should've written this in the first place

@qwwdfsad
Copy link
Collaborator

Also, it closes #287

- Remove CommonEnumSerializer.create
- Share PRIMITIVE constant between JsonPrimitiveInput/Output
- Support JsonNull on top-level
@sandwwraith sandwwraith requested a review from qwwdfsad May 27, 2019 16:27
@sandwwraith
Copy link
Member Author

Merged manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants