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

Improve polymorphic deserialization optimization: #2481

Merged
merged 5 commits into from
Oct 19, 2023

Commits on Oct 17, 2023

  1. Improve polymorphic deserialization optimization:

    Previously, when discriminator was found as the first key in Json, but there was no deserializer for it, we still fell back to a slow path with JsonTree.
    It was actually meaningless because a slow path always throws exception when a serializer is not found.
    Such behavior led to unnecessary memory pressure & consumption in exceptional cases (see linked ticket for details).
    
    Also make polymorphic deserialization exception messages more meaningful and make them more consistent with serialization ones.
    
    Also fix behavior when the actual discriminator value is JsonNull (it should be treated as missing, not as "null" string).
    
    Fixes #2478
    sandwwraith committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    4483f3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f35f44a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4ba34ab View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. ~clean up a bit

    sandwwraith committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    e69acbd View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Configuration menu
    Copy the full SHA
    f96d7f9 View commit details
    Browse the repository at this point in the history