impl serde::Deserialize... is it really that complicated?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • kaydle

    An alternative implementation of Kat's Document Language, including serde integration

  • Now, in practice, most deserializers will transparently forward themselves through visit_newtype_struct (json, yaml, MessagePack). However, because deserialize_newtype_struct has access to the type name being deserialized, and some deserializers will use this type name to inform custom behavior. For instance, in my (in-progress) implementation of KDL uses type names (including newtype names) to inform the names of nodes in homogeneous lists, bridging the gap between serde's collection-oriented model and KDL's node-oriented model. You can also see that the json and MessagePack serde implementations use special typenames to opt-in to custom behavior (like serde-json's raw-value feature).

  • bincode

    A binary encoder / decoder implementation in Rust.

  • Step 1: The Deserialize type requests data from the Deserializer with one of the deserialize_type methods. This gives it an opportunity to provide certain metadata about the type: structs provide a list of fields, enums provide a list of variants, tuples provide a length, etc. Some data formats (notably bincode) require this metadata to drive deserializing, as the wire format is not self-describing. Crucially, the Deserialize type also provides a visitor that is capable of receiving the requested data from the Deserializer.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts