Skip to content
CAI
Software that uses CAICheck a score

serde-rs/json

66.0

Adequate · 30 September 2026

16.4k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Rust library for serializing and deserializing data structures to and from JSON. It provides core functionality for parsing and generating JSON, including support for untyped values, arbitrary-precision numbers, and high-performance float conversion. The library is designed to be robust and flexible, featuring no\_std compatibility for embedded environments and comprehensive fuzzing and regression testing to ensure correctness.

How it got here

2015 — Initial release and structural cleanup

6 changes.

This period marks the initial release of the serde\_json crate, establishing core serialization and deserialization capabilities with architecture-optimized build configurations. Concurrently, legacy components such as the builder API, Syntex-based build scripts, and outdated test infrastructure were removed to streamline the project structure and modernize the codebase.

2017 — Initial release and core feature expansion

5 changes.

This period marks the initial release of the serde\_json crate, establishing foundational JSON serialization and deserialization capabilities with core types and macros. It also involved significant internal restructuring of the Value module to support 128-bit integers and improved maintainability, alongside the expansion of the test suite to cover edge cases and syntax errors.

2019–2020 — no\_std support and lexical parsing

6 changes.

The project refactored the I/O module to enable no\_std compatibility for embedded environments and integrated the rust-lexical library for high-precision float parsing. Extensive regression and unit tests were added to verify these changes, including edge cases for JSON serialization and the new lexical conversion algorithms.

Features

Added from\_slice fuzzer and updated fuzzing configuration

A new fuzzing target has been added to test the \serde\_json::from\_slice\ function, allowing the fuzzer to exercise JSON deserialization from byte slices. Additionally, the fuzzing directory's \.gitignore\ has been updated to properly exclude artifacts, corpus, coverage, target, and lock files from version control.

fuzz · high confidence

Import lexical string-to-float conversion implementation

The \src/lexical\ module now contains the core algorithms for converting decimal strings to floating-point numbers, imported from the rust-lexical library. This adds support for high-precision, fast decimal-to-float parsing (including fast, moderate, and fallback paths) and big-integer arithmetic to the project.

src/lexical · high confidence

Initial release of serde\_json

This is the first release of the serde\_json crate, providing JSON serialization and deserialization support for Rust. It introduces core types such as \Value\, \Number\, and \Map\ for untyped and strongly typed JSON handling, along with the \json!\ macro for constructing JSON literals. The library supports deserializing from strings, slices, and I/O readers, and includes features like \RawValue\ for deferring parsing and \arbitrary\_precision\ for handling large numbers without loss of fidelity.

src · high confidence

Initial release of serde\_json with build configuration and documentation

This change introduces the initial version of the serde\_json crate, providing the core library for serializing and deserializing Rust data structures to and from JSON. It includes a build script (build.rs) that automatically configures the optimal arithmetic limb width (32-bit or 64-bit) based on the target architecture to optimize float and string parsing performance. The release also adds standard project documentation, including a comprehensive README with usage examples, a CONTRIBUTING guide, and Apache-2.0/MIT license files.

(repo-wide) · high confidence

Restructure Value module and add 128-bit integer support

The \src/value\ module has been reorganized into separate files (\de.rs\, \from.rs\, \index.rs\, \mod.rs\, \partial\_eq.rs\, \ser.rs\) to improve maintainability. This change introduces support for 128-bit integers (\i128\ and \u128\) in \Value\ serialization and deserialization, particularly when the \arbitrary\_precision\ feature is enabled. It also adds \From\ implementations for various numeric types, enables \f32\ and \f64\ as map keys, and implements \Hash\ and \Eq\ for \Value\.

src/value · high confidence

Removals

Removal of legacy JSON builder API and internal modules

The \builder\ module, which provided \ArrayBuilder\ and \ObjectBuilder\ for constructing JSON values, has been removed. Additionally, the internal implementation files for deserialization (\de.rs\), error handling (\error.rs\), serialization (\ser.rs\), and the core \Value\ type (\value.rs\) have been deleted from this location, indicating a significant restructuring or removal of the core JSON processing logic in this crate.

json · high confidence

Removal of local JSON benchmarks

The local benchmark suite located in the \json\_tests/benches\ directory has been removed. This includes the deletion of \bench.rs\, \bench.rs.in\, and \bench\_log.rs\, which previously contained performance tests for HTTP log parsing using \rustc\_serialize\ and early \serde\ implementations. Users should refer to the dedicated \json-benchmark\ repository for performance testing.

_json\tests/benches · high confidence

Behavioural changes

Refactor I/O module to support no\_std environments

The I/O module has been restructured to provide a \no\_std\-friendly facade. When the \std\ feature is disabled, the module now uses a custom implementation (\src/io/core.rs\) that provides infallible \Write\ operations and a simplified \Error\ type, ensuring I/O operations do not fail in constrained environments. When \std\ is enabled, it reexports the standard library's \std::io\ types, including \Read\ and \Bytes\. This change removes previous dependencies on heap-allocated error boxes and OS-specific backtraces in the \no\_std\ path, making the library suitable for embedded or kernel-level use cases.

src/io · high confidence

Removal of Syntex-based build script for JSON tests

The build script for the json\_tests crate has been removed, eliminating the use of the Syntex macro expansion system and the serde\_codegen dependency for generating test code from .in templates. This change simplifies the build process by removing the conditional compilation logic that previously handled Syntex-based code generation, indicating a shift away from this specific macro expansion approach for the test suite.

_json\tests · high confidence

Test coverage

Added UI tests for json! macro syntax errors; Added no-std compatibility test for the crate; Added regression tests for JSON parsing and serialization edge cases; Added test macros for JSON string generation and pretty-printing; Added unit tests for the lexical float parsing and conversion algorithms; Consolidated and expanded test suite; Removal of legacy test infrastructure and builder tests.

Dependencies

Update to serde\_json 1.0.151 with Rust 1.71 requirement and dependency modernization

The crate has been updated to version 1.0.151, raising the minimum supported Rust version to 1.71 and adopting the 2021 edition. Key dependency updates include switching the primary serialization dependency from \serde\ to \serde\_core\ (v1.0.220), updating \indexmap\ to v2.2.3 for the \preserve\_order\ feature, and bumping \itoa\ to v1.0. The project structure has also been consolidated: the legacy \json/\ and \json\_tests/\ directories have been removed in favor of a unified workspace containing the main crate, a fuzzing target (\fuzz/\), and a dedicated test crate (\tests/crate/\).

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 73 → 66 (-7.2)
  • Rubric changed (rubric-2026.09.10 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 94 → 94 (+0.0)
  • Architecture 100 → 99 (-0.5)
  • Maturity 61 → 61 (+0.0)
  • Readiness 68 → 51 (-16.7)
  • Security 100 → 100 (+0.0)

Resolved (4)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no licence statement (README.md)
  • Documentation: no usage examples (README.md)
  • Off-boarding risk: anonymized user #1

New (7)

  • Dependency hygiene PARTLY measured — Cargo dependencies read, no committed lock to grade for currency
  • Inconsistent naming for equivalent operations: StreamDeserializer uses new while Deserializer has both new and from_reader. If new is kept for StreamDeserializer, it should likely be removed from Deserializer to avoid confusion about which constructor to use.
  • Inconsistent naming for factory methods: from_f64, from_i128, from_u128 use the from_<type> pattern, but from_string_unchecked uses a different pattern (from_<source>_unchecked).
  • Inverted test pyramid
  • Low cohesion: IoRead (LCOM4 4) (src/read.rs)
  • Off-boarding risk: anonymized user #1
  • Redundant constructors: new and from_reader perform the same function of creating a Deserializer from a reader.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

serde-rs/json was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit afdf6fc67247dd7fa4fcde1381e6ecc6bcc7a30e — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-836b52ac9a11.