playframework/play-json
58.1
Adequate · 6 November 2026
14.5k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Features
Add JavaScript-specific JSON parsing and serialization bindings
Introduces a new \StaticBinding\ object in the Play JSON JavaScript module to handle JSON operations on the client side. This implementation leverages the native \JSON.parse\ and \JSON.stringify\ APIs for parsing strings and serializing \JsValue\ objects, while delegating stream-based operations (such as \parseJsValue\ from an \InputStream\ and \writeToStream\) to the shared non-JVM implementation. This enables direct integration with browser-native JSON handling for improved performance and compatibility in Scala.js environments.
play-json/js/src/main · high confidence
Add Scala 3 JSON derivation macros and enum support
This release introduces native Scala 3 support for the play-json library, enabling automatic derivation of JSON readers, writers, and formats for case classes and sealed traits via compile-time macros. It adds dedicated support for Scala 3 enums, allowing them to be serialized and deserialized using \Json.enumReads\ and \Json.enumWrites\, with options for case-insensitive matching. The update also includes compatibility traits for recursive type definitions and value classes, ensuring that Scala 3 users can leverage the same macro-based JSON handling capabilities previously available only in Scala 2.
play-json/shared/src/main/scala-3/play/api/libs/json · high confidence
Add stream-based JSON I/O and native bindings for Scala.js/Scala Native
This change introduces new support for reading and writing JSON directly to and from streams in the Scala.js and Scala Native targets. The \StaticBindingNonJvm\ object now provides \parseJsValue\ to read JSON from an \InputStream\, as well as \writeToStream\ and \prettyPrintToStream\ to serialize \JsValue\ objects directly to an \OutputStream\. Additionally, new \EnvReads\ and \EnvWrites\ traits are added to handle platform-specific number parsing and writing, ensuring that \BigDecimal\ and \BigInteger\ values are correctly handled in non-JVM environments.
play-json/js-native · high confidence
Added Joda-Time JSON serialization support
The play-json-joda module now provides implicit Reads and Writes for Joda-Time types (DateTime, LocalDate, LocalTime), enabling seamless conversion between JSON and Joda date/time objects. Users can serialize Joda instances to ISO-8601 strings or numeric timestamps and parse them back, with support for custom date/time patterns and input correction functions.
play-json-joda/src/main/scala/play/api/libs/json · high confidence
Introduction of Jackson-based JSON serialization and deserialization
Added a new Jackson integration module (\JacksonJson.scala\) that provides serializers and deserializers for Play's \JsValue\ types. This allows users to leverage Jackson's \ObjectMapper\ for JSON processing, including support for custom configurations such as \BigDecimal\ precision limits, zero-decimal preservation, and integration with standard Jackson modules like Java Time and Scala defaults.
play-json/jvm/src/main/scala/play/api/libs/json/jackson · high confidence
Native JSON parsing support via Jawn
Play JSON now supports parsing JSON data into JsValue on Scala Native platforms. This is achieved by integrating the Jawn library, which provides a facade for parsing raw bytes, strings, and input streams into the library's JSON representation. Other operations like generation and pretty-printing continue to delegate to the existing non-JVM implementation.
play-json/native/src/main · high confidence
New configuration and streaming capabilities for JSON parsing and writing
The play-json library now includes configurable limits for BigDecimal parsing to prevent potential denial-of-service attacks via extremely large numbers, allowing users to set digit and scale limits via system properties. Additionally, new streaming APIs have been added to the StaticBinding object, enabling users to parse JSON directly from InputStreams and write or pretty-print JSON output directly to OutputStreams, reducing memory overhead for large payloads.
play-json/jvm/src/main/scala/play/api/libs/json · high confidence
Support for Java Enum serialization in Play JSON
The Play JSON library now supports reading and formatting Java enums. This change adds platform-specific macro implementations (for JVM, JavaScript, and Native targets) that enable automatic conversion between Java enum constants and their string representations in JSON, allowing users to seamlessly serialize and deserialize Java enum types without manual configuration.
(repo-wide) · high confidence
Removals
Removal of Java JSON API
The \play.libs.Json\ class and its associated test suite have been removed from the \play-json\ module. This eliminates the Java-specific helper methods for parsing, serializing, and manipulating JSON nodes (such as \parse\, \toJson\, \fromJson\, and \stringify\), meaning Java applications can no longer use this legacy API for JSON handling within this library.
play-json · high confidence
Removal of legacy play-json source files
The \play-json\ module has removed a significant set of core source files, including \JsConstraints.scala\, \JsMacroImpl.scala\, \JsPath.scala\, \JsResult.scala\, \Json.scala\, \JsonConfiguration.scala\, \JsonValidationError.scala\, \Reads.scala\, \Writes.scala\, and \JacksonJson.scala\. This deletion eliminates the library's previous JSON parsing, serialization, macro-based format derivation, and Jackson integration implementations, effectively removing these capabilities from the product.
play-json/src/main/scala/play/api/libs/json · high confidence
Behavioural changes
Applicative.pure now uses by-name evaluation
The \Applicative.pure\ method signature has changed from \pure\[A\](a: A)\ to \pure\[A\](f: =\> A)\, making the argument by-name (lazy). This ensures that the value is not evaluated until it is actually needed within the context, which can prevent unnecessary computation or side effects during construction. A deprecated \pure\[A\](value: A)\ method remains available for backward compatibility, delegating to the new by-name version.
play-functional/src/main/scala/play/api/libs/functional · high confidence
Introduces Scala 2.13+ specific JSON collection implementations
This change adds new internal classes and objects to support Scala 2.13+ collection semantics within the play-json library. It introduces \ImmutableLinkedHashMap\ to wrap Java's \LinkedHashMap\ as an immutable Scala map, addressing hash collision mitigation for \jsObject.value\. A new \JsObjectBuilder\ is added to efficiently construct \JsObject\ instances using Scala 2.13's builder pattern. Additionally, \MapWrites\ provides a serializer for \Map\[String, V\]\ types using Scala 2.13's \MapOps\, and \ScalaCollectionCompat\ provides a local shim for the \Factory\ type to avoid dependency on the external \scala-collection-compat\ library.
play-json/shared/src/main/scala-2.13+/play/api/libs/json · high confidence
Introduces internal collection compatibility and builder utilities for Scala 2.12 and earlier
This change adds four new internal files to the Scala 2.12- source directory to support cross-building and improve collection handling. It introduces \ImmutableLinkedHashMap\ to wrap Java's \LinkedHashMap\ as a Scala immutable map, addressing hash collision mitigation for \JsObject\ values. It also adds \JsObjectBuilder\ to efficiently construct \JsObject\ instances, \MapWrites\ to provide serialization for \Map\[String, V\]\ types, and \ScalaCollectionCompat\ to backport Scala 2.13 collection factory APIs (replacing the external \scala-collection-compat\ dependency) for older Scala versions.
play-json/shared/src/main/scala-2.13-/play/api/libs/json · high confidence
Play JSON library restructured for Scala 3 and cross-compilation
The play-json library has been reorganized into a shared source directory to support cross-compilation to Scala 3, introducing new type classes KeyReads and KeyWrites for serializing Map keys of non-String types, and adding a PascalCase naming strategy alongside existing SnakeCase and Identity options. The core parsing and writing API now supports direct output to OutputStreams, and the JsResult type has been enhanced with functional methods like exists, forall, and recoverWith to improve error handling and composition for users.
play-json/shared/src/main/scala/play/api/libs/json · high confidence
Project rebranding, license update, and documentation overhaul
The project has been rebranded from 'Play JSON' to 'Play JSON' under the \org.playframework\ Maven group ID, replacing the previous \com.typesafe.play\ coordinates. The license file has been updated to the standard Apache 2.0 text with full legal terms. Additionally, the \README.md\ has been significantly expanded to include comprehensive usage documentation for Scala 2.12, 2.13, and Scala 3, covering JSON AST, traversal, and serialization, while the \version.sbt\ file was removed in favor of dynamic versioning.
(repo-wide) · high confidence
Scala 2 JSON macro implementation and compatibility traits
This change introduces the Scala 2-specific implementation of the JSON macro system, including the \JsMacroImpl\ class that generates \Reads\, \OWrites\, and \OFormat\ instances for case classes and value classes at compile-time. It also adds \EnumerationWrites\ to provide implicit serialization for Scala enumerations by name, and establishes several private compatibility traits (\ScalaCompatJson\, \ScalaCompatFormat\, etc.) to support the \Json\ companion object and macro interfaces within the Scala 2 codebase.
play-json/shared/src/main/scala-2/play/api/libs/json · high confidence
Standardized CI test execution for Scala 2 and 3
The CI pipeline now uses a dedicated executable script to run tests, ensuring sufficient memory (4GB heap) is allocated for the sbt server during full test suites. The script dynamically targets the configured Scala version (2.12, 2.13, or 3.3) and conditionally skips documentation tests for Scala 2.12, reflecting that Play 2.9.x is no longer published for that version.
scripts · high confidence
Syntax package formatting and Scaladoc updates
The \play.api.libs.functional.syntax\ package has been reformatted to improve code readability, including line breaks for implicit conversion methods and indentation adjustments. The Scaladoc comment has been updated to use backticks for the import statement instead of triple braces, and the copyright header has been refreshed to reflect 2022 ownership by The Play Framework Contributors. Additionally, the \unapply\ method implementation was simplified by removing the explicit parameter type annotation in favor of a direct function application.
play-functional/src/main/scala/play/api/libs/functional/syntax · high confidence
Updated Mima exclusions and test logging configuration
This change updates the Play JSON library's binary compatibility filters and test infrastructure. It adds Mima exclusions for deprecated Joda-Time serialization methods in the 2.8.x branch and excludes a missing type problem for the internal JsonConfigImpl class in the 3.1.x branch, ensuring smooth upgrades for users. Additionally, the test logging configuration (logback-test.xml) has been migrated to Logback's new canonical XML format, which may affect how test logs are formatted or processed during development.
play-json/jvm · high confidence
Test coverage
Added JMH benchmarks for Play JSON serialization and lookup performance; Added JavaScript-specific JSON parsing tests; Added Scala 2-specific test coverage for JSON macros and formatting; Added Scala 3-specific test coverage for JSON derivation macros; Added Scala 3-specific tests for Play JSON enum serialization; Added Scala Native test suite and test utilities; Added memory footprint tests for JSON parsing and JsObject operations; Added test support for Java enum serialization; Added tests for Scala 3 enum serialization; Added validation tests for Joda-Time JSON serialization; Expanded test coverage for play-json JVM module; Migrate play-json test suite to ScalaTest; Removal of legacy JSON library test suite.
Dependencies
Major dependency upgrades and build infrastructure overhaul
The build system has been significantly modernized, upgrading Jackson to version 2.22.3, Specs2 to 4.23.0, and Joda-Time to 2.15.0. The project now targets Java 17 and Scala 17 release compliance, dropping support for older Java versions. Cross-compilation support has been expanded to include Scala Native and Scala 3, with specific dependencies like \scalajs-java-securerandom\ and \jawn-parser\ added for JS and Native platforms respectively. Binary compatibility checks (MiMa) are now configured against version 3.1.0-M1, and the build utilizes \sbt-ci-release\ for publishing to Sonatype.
(dependencies) · high confidence
Migrate build system to sbt 2.1 and update Scala versions
The project build has been upgraded from sbt 0.13.13 to sbt 2.1.0-M3, requiring a corresponding update to the sbt plugin ecosystem (including play-docs-sbt-plugin, sbt-jmh, sbt-mima-plugin, sbt-header, sbt-scalajs, sbt-scala-native, and sbt-scalafmt). The build now supports Scala 2.12.21, 2.13.18, 3.3.8, 3.9.0, and 3.10.0-RC3. Additionally, the build organization has switched from com.typesafe.play to org.playframework, and the release resolver has been updated to use Sonatype Central Snapshots.
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 53 → 58 (+5.3)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 64 → 64 (-0.2)
- Architecture 71 → 71 (+0.0)
- Maturity 34 → 50 (+15.8)
- Readiness 72 → 77 (+5.0)
- Security 76 → 60 (-15.8)
- Performance 76 → 76 (+0.0)
Resolved (3)
- Duplicated block (20 lines × 2) (play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala)
- Duplicated block (6 lines × 2) (play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala)
- Off-boarding risk: anonymized user #1
New (7)
- Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
- Duplicated block (27 lines × 2) (play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala)
- Duplicated block (6 lines × 2) (play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala)
- Hotspot: play-json/shared/src/main/scala-2/play/api/libs/json/JsMacroImpl.scala (play-json/shared/src/main/scala-2/play/api/libs/json/JsMacroImpl.scala)
- Hotspot: play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala (play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala)
- Off-boarding risk: anonymized user #1
- WritesHelper.productWrites (cyclomatic 27) (play-json/shared/src/main/scala-3/play/api/libs/json/JsMacroImpl.scala)
Changes since last survey
- 9 commits — 8 feature/other, 1 fixes
By area
- (repo) — 4 commits
- (root) — 2 commits
- play-json/shared — 1 commit
- project/Dependencies.scala — 1 commit
- project/build.properties — 1 commit
Notable commits
- fix: Merge pull request #1482 from linyiru/fix/json-newbuilder-order
- change: Close #367 - Introduce annotations @ignore and @flatten for macro usages (#1427)
- change: Merge pull request #1496 from scala-steward/update/patches
- change: Merge pull request #1502 from scala-steward/update/sbt-2.1.0-RC2
- change: Merge pull request #1506 from scala-steward/update/patches
- change: joda-time 2.15.1 (was 2.15.0)
- change: logback-classic 1.6.6 (was 1.6.5) (#1500)
- change: sbt 2.1.0-RC2 (was 2.1.0-RC1)
- change: scala3-compiler_3 3.3.9 (was 3.3.8)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 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
playframework/play-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 cd0820cb8c2292f83fdc0c183059326d2fbe8450 — 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.