Deser: Rethinking Rust Serialization
Serde is an impressive serialization library for Rust that has greatly contributed to the productivity of many developers over the years. However, despite its popularity, there have been some limitations experienced by users such as frustration with certain constraints imposed by Serde's design.
Three examples of such corner cases include an internally tagged enum with arbitrary precision numbers, JSON keys being always strings, and the inability to pass a function as a type parameter. These limitations are not easily fixable within the confines of Serde's design, as they stem from fundamental decisions made by the library.
In response to these challenges, the author created Deser, a Rust serialization library that takes the user experience of Serde and builds upon a different architecture inspired by miniserde. Deser aims to address some of the shortcomings observed in Serde by providing a different approach to handling serialization and deserialization processes.
This includes a completely new architecture that turns the traditional design on its head, making Deser a compelling alternative worth considering for those interested in exploring different serialization solutions in Rust.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.