Skip to content

Cosmos: Modernize our JSON serialization/deserialization #34567

@roji

Description

@roji

Our Cosmos deserialization is currently based on using Newtonsoft.Json to deserialize to DOM JTokens, which are then e.g. processed by our shapers. We should take a look at the entire approach here and decide what to do; at the very least, we should consider moving from Newtonsoft.Json to System.Text.Json - using Newtonsoft.Json notably means that deserialization happens synchronously (its JsonSerializer doesn't support async).

To improve performance, we could go all the way and stop serializing/deserializing to DOM types altogether, and use low-level parsing directly from UTF8, like we already do in relational.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions