zio/zio-json
55.8
Adequate · 6 November 2026
16.8k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Features
Add HTTP4s interop example project
Added a new example project in \examples/interop-http4s\ demonstrating how to integrate zio-json with HTTP4s. The project includes a runnable server (\Main.scala\, \Server.scala\) that starts an HTTP4s Blaze server on port 8080, routes (\HelloWorldRoutes.scala\) that handle GET requests to \/hello/{name}\ and return a JSON greeting, and a README with usage instructions.
examples/interop-http4s · high confidence
Add JVM-specific streaming JSON read/write APIs
This change introduces platform-specific implementations for the JVM that enable streaming JSON operations via ZIO Streams. Users can now read JSON from files, paths, URLs, or byte/character streams using \readJsonAs\ and \readJsonLinesAs\, and write JSON to files or paths using \writeJsonLines\ and \writeJsonLinesAs\. These methods leverage new \decodeJsonPipeline\ and \encodeJsonLinesPipeline\/\encodeJsonArrayPipeline\ utilities to handle large datasets efficiently without loading entire payloads into memory.
zio-json/jvm/src/main · high confidence
Add Refined type interop for JSON encoding and decoding
Users can now seamlessly encode and decode \eu.timepit.refined\ types (such as \NonEmptyString\) using zio-json. This new module provides implicit \JsonEncoder\ and \JsonDecoder\ instances that automatically apply refinement validation during decoding and extract the underlying value during encoding, ensuring that invalid data is rejected with descriptive error messages.
zio-json-interop-refined/shared · high confidence
Add Scalaz interop module for IList serialization
A new interop module for Scalaz 7.x has been introduced, providing implicit JSON encoders and decoders for Scalaz's \IList\ type. This allows users to seamlessly serialize and deserialize \IList\ collections to and from JSON using zio-json, with corresponding tests verifying correct behavior for both standard and pretty-printed formats.
zio-json-interop-scalaz7x/shared · high confidence
Add ZIO JSON integration for http4s
This change introduces the \zio-json-interop-http4s\ module, providing \EntityEncoder\ and \EntityDecoder\ instances that allow http4s services to seamlessly serialize and deserialize ZIO JSON types. Users can now use \zio.json\ codecs directly within http4s routes for handling JSON request bodies and responses, with built-in support for error handling on malformed or empty JSON payloads.
zio-json-interop-http4s · high confidence
Add ZioJson interop for Enum and ValueEnum types
This change introduces a new interop module that enables seamless JSON serialization and deserialization of enumeratum enums using the zio-json library. It provides \ZioJsonEnum\ and \ZioJsonKeyEnum\ traits for standard string-based enums, offering encoders/decoders with case-sensitivity options (lowercase, uppercase, case-insensitive). For value-based enums (Int, Long, Short, String, Char, Byte), it supplies corresponding \\*ZioJsonEnum\ traits that serialize to and from their underlying primitive values, along with field encoders/decoders to allow these enums to be used as keys in JSON objects.
zio-json-interop-enumeratum/shared · high confidence
Added Scala Native platform support
zio-json now supports Scala Native. This change introduces the necessary platform-specific trait definitions (JsonPackagePlatformSpecific, JsonDecoderPlatformSpecific, and JsonEncoderPlatformSpecific) in the native source directory, enabling the library to be compiled and used on the Scala Native target.
zio-json/native · high confidence
Added http4s interop example project
An example project demonstrating the usage of the http4s interop module has been added, featuring a HelloWorld service implementation that showcases JSON encoding and entity encoding integration.
interop-http4s · high confidence
Initial Scala.js support for zio-json
This change introduces the first version of zio-json for Scala.js, enabling JSON encoding and decoding in JavaScript environments. The implementation provides platform-specific traits for encoders and decoders and includes a JavaScript-optimized \FastStringWrite\ class for efficient string construction, alongside the shared \SafeNumbers\ logic for robust number parsing and formatting.
zio-json/js · high confidence
Initial release of zio-json with Scala 3 support and new type codecs
This change introduces the core zio-json library, providing JSON encoding and decoding capabilities for Scala. It adds support for Scala 3, including native macro-based derivation for case classes and support for union types (enums). New codecs are added for \immutable.ArraySeq\, \IArray\, and various \java.time\ types (such as \Instant\, \LocalDateTime\, and \Period\). The library also includes a configuration for macro derivation via \deriving.conf\ and implements efficient internal readers and writers for parsing and generating JSON.
zio-json/shared/src/main · high confidence
Initial release of zio-json-yaml module
This change introduces the new zio-json-yaml module, providing YAML serialization and deserialization capabilities for zio-json. Users can now convert JSON ASTs to YAML strings (and vice versa) using the new \toYaml\ and \fromYaml\ extension methods, with configurable options for indentation, null handling, and scalar styles via \YamlOptions\.
zio-json-yaml/src/main/scala/zio/json/yaml · high confidence
Initial release of zio-json-yaml with YAML parsing support
This change introduces the initial version of the zio-json-yaml module, adding the YamlValueConstruction class to handle YAML value parsing. The implementation leverages the SnakeYAML library (specifically SafeConstructor) to convert YAML nodes into Java values, providing the foundational internal logic for YAML support within the zio-json ecosystem.
zio-json-yaml/src/main/scala/zio/json/yaml/internal · high confidence
Introduce zio-json-golden module for snapshot testing
The new zio-json-golden module provides golden (snapshot) testing capabilities for data types, allowing users to verify that serialization and deserialization behavior remains consistent over time. It introduces a \goldenTest\ function that generates sample data, compares it against stored reference files in \src/test/resources/golden/\, and flags any deviations. The module includes configuration options for customizing the reference file path and sample size, and handles the creation of \\_new\ or \\_changed\ files to help users update their snapshots when data structures evolve.
zio-json-golden · high confidence
Behavioural changes
New macro-based codec derivation and optimized number parsing
The library introduces a new \@jsonDerive\ annotation macro in \zio-json-macros\ that automatically generates \JsonEncoder\, \JsonDecoder\, and \JsonCodec\ instances for case classes and sealed traits, replacing the previous Magnolia-based derivation. This change is accompanied by a complete rewrite of the low-level number parsing logic in \UnsafeNumbers\ (for both JVM and JS platforms) to use a faster, exception-free path for integers and big integers. Additionally, the \JsonCodecConfiguration\ now includes an \enumValuesAsStrings\ option, which defaults to \true\ for Scala 3 users to serialize enum values and sealed trait case objects as JSON strings, while retaining the previous object-based behavior for Scala 2.
repository · high confidence
Project license changed from BSD to Apache 2.0
The project license has been updated from the BSD license to the Apache License, Version 2.0. This change affects the legal terms under which the software can be used, reproduced, and distributed.
(repo-wide) · high confidence
Removal of legacy JSON parsing and encoding infrastructure
The library has removed its previous manual JSON implementation, including the \zio.json.ast\ module for representing JSON as an Abstract Syntax Tree, the core \Decoder\ and \Encoder\ traits, the low-level \Lexer\ and \SafeNumbers\ parsing utilities, and the custom \Reader\/\Writer\ classes. Additionally, the \deriving.conf\ configuration file that previously pointed to these internal components has been deleted. This change eliminates the manually maintained parsing logic in favor of the library's new derivation-based approach.
src/main · high confidence
Updated JVM benchmark suite with new collection/UUID benchmarks and Play JSON removal
The JVM benchmark suite in \zio-json/jvm/src/jmh/scala/zio/json\ has been refreshed to reflect current API usage and performance priorities. New benchmarks were added for \Array\[Boolean\]\ allocation reproduction, \Chunk\[Byte\]\ decoding (including concatenated chunks), general collection encoding/decoding (List, Vector, Map, Set, etc.), and UUID parsing. Existing benchmarks (GeoJSON, Google Maps, Twitter) were migrated to use the modern \.fromJson\/\.toJson\ syntax and direct \JsonEncoder\/\JsonDecoder\ references, and all Play JSON comparison benchmarks were removed.
zio-json/jvm/src/jmh/scala/zio/json · high confidence
Updated floating-point and BigDecimal benchmarks to use 256-bit mantissa limit
The JVM benchmark suite for zio-json has been updated to align with the 256-bit mantissa limitation for parsing floating-point numbers. Specifically, the \SafeNumbersBenchFloat\ and \SafeNumbersBenchBigDecimal\ classes now invoke \UnsafeNumbers.float\ and \UnsafeNumbers.bigdecimal\ with a precision argument of 256, replacing the previous value of 128. This change ensures that the performance measurements reflect the current parsing behavior and limits applied to these numeric types.
zio-json/jvm/src/jmh/scala/zio/json/internal · high confidence
Test coverage
Added GeoJSON and Google Maps data models for testing; Added JSONTestSuite test resources for JVM validation; Added Scala 3-specific codec derivation and collection tests; Added golden file tests for JSON encoding and decoding; Added test coverage for JSON lexer, number parsing, and string matching; Added tests for JSON derivation macros; Expanded test coverage for JSON codec annotations, AST handling, and low-level decoding; Initial test coverage for YAML encoder and decoder; Initial test coverage for the JSON AST module; JVM-specific decoder/encoder streaming and corpus tests; Migrate test suite from utest/scalaprops to ZIO-Test; Updated Twitter data model test fixtures to use modern derivation APIs.
Dependencies
Migrate build infrastructure to ZIO SBT CI and modernize project structure
The build system has been significantly restructured, migrating CI workflows to zio-sbt-ci and adopting the ZIO project template. This change updates the default Scala version to 2.13.18, introduces MiMa binary compatibility checks, and adds specific test aliases for JVM, JS, and Native platforms. Additionally, new example projects for http4s interop and golden testing have been added, along with a documentation package.json for NPM publishing.
(dependencies) · high confidence
Upgrade build tooling and Scala versions
The build system has been upgraded to SBT 1.13.0, with Scala versions updated to 2.12.21, 2.13.18, and 3.9.0. Several SBT plugins have been updated to their latest versions, including sbt-scalafmt (2.6.2), sbt-scoverage (2.4.4), sbt-buildinfo (0.13.2), and sbt-ci-release (1.12.0). The JMH benchmarking library version was bumped to 1.37, and the snakeyaml-engine dependency was updated to 3.1.1.
project · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 62 → 56 (-5.9)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 64 → 64 (+0.0)
- Architecture 92 → 91 (-1.3)
- Maturity 52 → 52 (+0.0)
- Readiness 89 → 91 (+1.9)
- Security 64 → 46 (-18.1)
- Performance 84 → 84 (+0.0)
Resolved (4)
- Off-boarding risk: anonymized user #1
- Off-boarding risk: anonymized user #2
- Outdated: org.http4s:http4s-dsl_2.13
- Outdated: org.typelevel:cats-effect_2.13
New (3)
- Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
- Off-boarding risk: anonymized user #2
- Off-boarding risk: anonymized user #1
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- (root) — 1 commit
Notable commits
- change: Update jsoniter-scala-core, ... to 2.42.1 (#1737)
Architecture
- Unchanged — 0 containers · 2 contexts · 1 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
zio/zio-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 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 42bf8d5e72caf7ad32298346311cd019f87a9bcc — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.