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

Do not use tree-based decoding for polymorphism #1839

Closed
qwwdfsad opened this issue Jan 24, 2022 · 0 comments
Closed

Do not use tree-based decoding for polymorphism #1839

qwwdfsad opened this issue Jan 24, 2022 · 0 comments
Assignees

Comments

@qwwdfsad
Copy link
Member

Currently, even for regular usages, Json operates in two modes -- streaming-based decoding and, in the case of polymorphism, JsonElement-based decoding.

The latter complicates maintainability, predictability of code execution and debuggability (e.g. printing proper error reporting, toString, code bloating and a separate-code path used for polymorphism-unrelated functionality).

My proposal is to completely get rid of tree-based deciding on the path of decodeFromString and decodeFromSteam and maintain it only for JsonElement serialization

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

1 participant