Skip to content

fix(deps): bump: bump com.cedarsoftware:json-io from 4.93.0 to 4.100.0#392

Open
dependabot[bot] wants to merge 1 commit into3.xfrom
dependabot/gradle/3.x/com.cedarsoftware-json-io-4.100.0
Open

fix(deps): bump: bump com.cedarsoftware:json-io from 4.93.0 to 4.100.0#392
dependabot[bot] wants to merge 1 commit into3.xfrom
dependabot/gradle/3.x/com.cedarsoftware-json-io-4.100.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Apr 10, 2026

Bumps com.cedarsoftware:json-io from 4.93.0 to 4.100.0.

Release notes

Sourced from com.cedarsoftware:json-io's releases.

4.100.0 - 2026-04-10

Bug Fixes

  • Fixed deadlock from circular static initialization between ReadOptionsBuilder and WriteOptionsBuilder. When two threads concurrently triggered class loading (e.g., one calling JsonIo.toJson() and another calling JsonIo.toJava()), the JVM's class initialization locks would deadlock. Broke the cycle by having each builder load its configuration independently and by removing the circular dependency through MetaUtils bootstrap methods.

Dependency Updates

  • java-util 4.100.0 (includes fix for unbounded Converter.FULL_CONVERSION_CACHE memory leak)
  • JUnit 5.14.2 → 5.14.3
  • Jackson 2.21.1 → 2.21.2

4.99.0 - 2026-03-28

  • PERFORMANCE: ToonWriter.needsQuoting() — replaced multi-method dispatch chain with a single-pass scanNeedsQuoting() method. Uses a pre-built boolean[128] lookup table per delimiter. JFR shows needsQuoting dropped from 383 samples to 25 — a 93.5% reduction.
  • PERFORMANCE: ToonReader.readLineRaw() — now uses FastReader.readLine() instead of readUntil() + separate read() + pushback. JFR shows TOON line-reading improved 28%.
  • PERFORMANCE: JsonWriter.writePrimitive() — added small-integer String cache (-128 to 16384) matching ToonWriter's range. JFR shows 898 allocation samples eliminated.
  • PERFORMANCE: ToonWriter — cycle-tracking structures allocated lazily based on cycleSupport mode. When cycleSupport=false (default), saves ~6 KB per writer. TOON write time improved 4-7%, reaching 2.02x Jackson.
  • PERFORMANCE: ToonReader.findColonInBuf() — single-pass scan with c <= ':' range guard. JFR shows 8-11% improvement in TOON read time.
  • PERFORMANCE: ToonReader string/number caching — replaced O(n) polynomial hash loops with O(1) cacheHash() sampling first, middle, and last chars + length. JFR shows 36% reduction. TOON read time improved 9-14%, reaching parity with json-io's JSON read.
  • PERFORMANCE: JsonWriter.writeObjectArray() now fast-paths Boolean, Double, Long, Integer, Float, Short, Byte, and String elements directly to writePrimitive()/writeStringValue(), bypassing the writeImpl() dispatch chain.
  • CLEANUP: Removed unused hasSameKeyOrder() method from ToonWriter.
  • CLEANUP: Removed two unreachable dead branches from writeFieldEntry() and writeFieldEntryInline().
  • CLEANUP: Fixed Javadoc tag error in getObjectFields().

4.98.0

Highlights

  • @IoShowType annotation — new field-level annotation (26th) that forces @type/$type emission on polymorphic fields regardless of showTypeInfo mode. Jackson's @JsonTypeInfo on a field is honored as a fallback synonym.
  • JSON5 defaults alignment.json5() now sets showTypeInfoNever() and cycleSupport(false), matching TOON conventions where type information is controlled via annotations.
  • ToonWriter bug fixes — type metadata indentation, char[] serialization, and complex map key StackOverflow resolved.
  • Significant performance optimizations across ToonReader, ToonWriter, JsonWriter, and JsonObject hot paths.
  • JSON5 added as 5th serialization test path — all existing round-trip tests now automatically cover JSON5 format.

Features

  • @IoShowType — field-level annotation that forces @type/$type emission on the annotated field's value and its elements (Collections, Maps, arrays), regardless of showTypeInfoNever(), JSON5, or TOON mode. Essential for polymorphic fields. Jackson's @JsonTypeInfo on a field acts as a fallback synonym.
  • .json5() on WriteOptionsBuilder now sets showTypeInfoNever() and cycleSupport(false) as defaults, aligning JSON5 with TOON conventions. Individual settings can still be overridden after calling .json5().
  • Spring auto-configuration — now provides a separate toonWriteOptions bean with cycleSupport(false) for TOON/JSON5 formats, in addition to the primary jsonIoWriteOptions bean.

Bug Fixes

  • ToonWriter — nested collections and arrays with type metadata (showTypeInfoAlways()) now emit properly indented $type/$items blocks. Previously, the compact fieldName[N]: path bypassed writeCollection()/writeArray() entirely.
  • ToonWriterchar[] fields now serialize as a plain string value instead of comma-separated characters, matching the Converter's String → char[] read path.
  • ToonWriter — maps with complex keys (e.g., HashMap as key) no longer cause StackOverflowError. Routes to writeMap() with @keys/@values format instead of writeMapInline().
  • EnumSetFactory — infers enum element type from field generic declaration (EnumSet<Color>Color.class). Empty EnumSets now round-trip correctly when field provides generic type information.

Improvements

... (truncated)

Changelog

Sourced from com.cedarsoftware:json-io's changelog.

4.100.0 - 2026-04-10

  • BUG FIX: Fixed deadlock caused by circular static initialization between ReadOptionsBuilder and WriteOptionsBuilder. When two threads concurrently triggered class loading (e.g., one calling JsonIo.toJson() and another calling JsonIo.toJava()), the JVM's class initialization locks would deadlock. Broke the cycle by having each builder load its configuration independently and by removing the circular dependency through MetaUtils bootstrap methods.

4.99.0 - 2026-03-28

  • PERFORMANCE: ToonWriter.needsQuoting() — replaced multi-method dispatch chain (isReservedScalarLiteral() + isSimpleUnquotedAsciiToken() + computeNeedsQuoting()) with a single-pass scanNeedsQuoting() method. Uses a pre-built boolean[128] lookup table per delimiter, reducing the inner character scan from 8 branch comparisons to 1 array access per character. Reserved-literal check merged inline with switch(first) + length gate. looksLikeNumber() now guarded by first-char check — only called for strings starting with 0-9, +, or . (~90% of calls eliminated). Character.isWhitespace() replaced with <= ' '. JFR shows needsQuoting dropped from 383 samples (#1 hotspot) to 25 samples — a 93.5% reduction.
  • PERFORMANCE: ToonReader.readLineRaw() — now uses FastReader.readLine() instead of readUntil() + separate read() + pushback for line-ending handling. Eliminates per-line method call overhead and the \r\n pushback round-trip. JFR shows TOON line-reading improved 28%, and FastReader.read() calls halved.
  • PERFORMANCE: JsonWriter.writePrimitive() — added small-integer String cache (-128 to 16384) matching ToonWriter's range. Avoids Integer.toString() allocation for common integer values during JSON serialization. JFR shows 898 allocation samples eliminated from Integer.toString ← writePrimitive path.
  • PERFORMANCE: ToonWriter — cycle-tracking structures (objVisited, objsReferenced, activePath, traceStack) are now allocated lazily based on cycleSupport mode. When cycleSupport=false (the default for TOON), no IdentityIntMap or IdentityHashMap is allocated, saving ~6 KB per writer. JFR shows 253 allocation samples eliminated. TOON write time improved 4-7%, reaching 2.02x Jackson (cycle=false).
  • PERFORMANCE: ToonReader.findColonInBuf() — replaced three-loop approach (find colon, check quotes, slow path) with a single-pass scan using a c <= ':' range guard. Letters and underscores (the vast majority of key characters) need only one comparison per char. JFR shows 8-11% improvement in TOON read time.
  • PERFORMANCE: ToonReader string/number caching — replaced O(n) polynomial hash loops in cacheSubstringFromBuf(), cacheSubstring(), cacheString(), and parseNumber() with a shared O(1) cacheHash() that samples first, middle, and last chars + length. For a 10-char field name, slot computation drops from 10 multiply-add iterations to 3. All four methods use the same formula so cross-lookups work correctly. JFR shows cacheSubstringFromBuf dropped from 177 to 113 samples (36% reduction). TOON read time improved 9-14%, reaching parity with json-io's JSON read for toJava.
  • CLEANUP: Removed unused hasSameKeyOrder() method from ToonWriter.
  • CLEANUP: Removed two unreachable else if (value.getClass().isArray()) dead branches from writeFieldEntry() and writeFieldEntryInline().
  • CLEANUP: Fixed Javadoc tag error in getObjectFields() — bare @IoProperty annotation references wrapped in {@code} blocks.
  • PERFORMANCE: JsonWriter.writeObjectArray() now fast-paths Boolean, Double, Long, Integer, Float, Short, Byte, and String elements directly to writePrimitive()/writeStringValue(), bypassing the writeImpl()writeCustom() dispatch chain when @type is not needed. Mirrors the existing writeCollectionElement() optimization. JFR shows writeArrayElementIfMatching dropped from 62 samples to 0.

4.98.0 - 2026-03-08

  • BUG FIX: ToonWriter — nested collections and arrays with type metadata (showTypeInfoAlways()) now emit properly indented $type/$items blocks. Previously, the compact fieldName[N]: path bypassed writeCollection()/writeArray() entirely, and the inline list-element path wrote $type/$items at incorrect indentation levels. Fixed in writeFieldEntry(), writeFieldEntryInline(), writeFoldedEntry(), and writeListElement().
  • BUG FIX: ToonWriterchar[] fields now serialize as a plain string value instead of comma-separated characters, matching the Converter's String → char[] read path for correct round-trips.
  • BUG FIX: ToonWriter — maps with complex keys (e.g., a HashMap used as a key in another HashMap) no longer cause StackOverflowError. writeListElement() now checks hasComplexKeys() and routes to writeMap() (which uses @keys/@values format with cycle detection) instead of writeMapInline() which called key.toString() unconditionally.
  • BUG FIX: EnumSetFactory — now infers the enum element type from the field's generic declaration (e.g., EnumSet<Color>Color.class) via JsonObject.getItemElementType(). Previously, empty EnumSets or EnumSets without explicit @type on items could not round-trip through JSON/TOON when the field provided generic type information. Legacy RegularEnumSet JSON without @items now deserializes to an empty EnumSet instead of null when field context provides the enum class.
  • IMPROVEMENT: Field-context type resolution for enums, integer map keys, and EnumSets now works consistently across both JSON and TOON formats. List<Color>, Map<Integer, String>, and EnumSet<Color> fields all round-trip correctly using generic type inference from seedIncrementalContainerMetadata() — no explicit @type/$type needed in the stream.
  • IMPROVEMENT: JsonObject internal storage mode consolidated from two boolean flags (keysWereSet/itemsWereSet) into a single byte with four named states (MODE_POJO, MODE_ITEMS, MODE_KEYS_ONLY, MODE_KEYS_ITEMS), and a cached effectiveValues reference eliminates repeated conditional dispatch across 10 hot-path methods.
  • IMPROVEMENT: TOON same-type round-trip design — TOON writes Converter-supported types as bare strings without $type metadata. Reading back via .asClass(OriginalType) uses the Converter's String → OriginalType path and works for all supported types. Cross-type conversion (e.g., write ZonedDateTime, read as Long) is not supported directly through TOON; users should read back as the original type first, then use the Converter for cross-type needs.
  • PERFORMANCE: JsonIo.toToon() now defaults to cycleSupport(false) when null is passed for WriteOptions, skipping the traceReferences() pre-pass for ~35-40% faster TOON serialization. TOON targets LLM communication where data is typically acyclic; if a cycle is encountered, a clear JsonIoException is thrown with guidance to enable cycleSupport(true).
  • PERFORMANCE: ToonReader.cacheSubstring() now probes its string cache by source range before materializing a substring, eliminating allocation on cache hits in hot key/value parsing paths.
  • PERFORMANCE: ToonReader now loads line metadata without eagerly materializing trimmed line strings; peekTrimmed() creates them lazily only when the caller needs line text.
  • PERFORMANCE: TOON string/input-stream reads now reuse the main FastReader character buffer via JsonIo's scoped buffer recycler, reducing per-parse reader-buffer allocation without sharing mutable buffers across live parsers.
  • PERFORMANCE: ToonReader now parses common unquoted scalar values directly from source ranges in object, list, inline-array, and tabular read paths, avoiding intermediate String creation before boolean/number classification.
  • PERFORMANCE: ToonReader now parses combined field[N]... array headers directly from existing key/value slices instead of rebuilding synthetic array strings, reducing TOON maps-read overhead for inline and tabular object fields.
  • PERFORMANCE: JsonObject default constructor now defers keys[]/values[] allocation using a shared empty sentinel, avoiding 256 bytes of wasted arrays for array/collection nodes that only use items[] storage.
  • PERFORMANCE: JsonObject.appendFieldForParser() no longer redundantly nulls hash and index fields that are already null during parsing.
  • PERFORMANCE: ToonWriter tabular POJO detection now validates uniformity directly via WriteFieldPlan accessors instead of creating a LinkedHashMap per element via getObjectFields(). Row values are streamed from accessors during the write phase, eliminating N intermediate map allocations per tabular array.
  • PERFORMANCE: JsonWriter tracking structures (objVisited, objsReferenced, traceDepths vs activePath) are now allocated lazily based on cycleSupport mode, avoiding ~6 KB of wasted allocations per writer when cycle support is disabled.
  • PERFORMANCE: JsonWriter.writeCollectionElement() now fast-paths Integer, Float, Short, and Byte directly to writePrimitive(), bypassing the writeImpl()writeCustom() dispatch chain when @type is not needed.
  • PERFORMANCE: JsonWriter.writeCollection() uses indexed list.get(i) for RandomAccess lists (e.g., ArrayList) instead of allocating an Iterator. writeObject() and enum field loops also use indexed iteration to avoid implicit Iterator allocation.
  • FEATURE: @IoShowType — new field-level annotation (26th annotation) that forces @type/$type emission on the annotated field's value and its elements (Collections, Maps, arrays), regardless of the global showTypeInfo setting. Essential for polymorphic fields when using showTypeInfoNever(), JSON5 mode, or TOON format. Jackson's @JsonTypeInfo on a field is honored as a fallback synonym.
  • IMPROVEMENT: .json5() on WriteOptionsBuilder now sets showTypeInfoNever() and cycleSupport(false) as defaults, aligning JSON5 with TOON conventions where type information is controlled via annotations rather than embedded metadata. Individual settings can still be overridden after calling .json5().
  • IMPROVEMENT: Spring auto-configuration now provides a separate toonWriteOptions bean with cycleSupport(false) for TOON/JSON5 formats, in addition to the primary jsonIoWriteOptions bean.
  • TESTING: Added TOON as 4th and JSON5 as 5th serialization path in TestUtil, enabling all existing round-trip tests to automatically cover both formats. JSON5 write: 1 fail (same custom writer edge case as json-io), JSON5 read: 0 fails.

4.97.0 - 2026-03-03

  • PERFORMANCE: ToonReader.peekLine() now avoids materializing a String for blank, comment, and indent-only lines, reducing per-line String allocations by ~50%.
  • PERFORMANCE: ToonReader.cacheSubstring() simplified to reduce code complexity and improve maintainability of the string caching layer.
  • PERFORMANCE: ToonReader.parseNumber() integer fast path now avoids autoboxing by returning primitive values directly.
  • PERFORMANCE: JsonObject index build is now deferred to the first lookup instead of construction time; ToonReader.lineBuf localized to reduce field access overhead.
  • PERFORMANCE: ToonReader.cacheSubstring() inlined at hot call sites; frequently accessed fields (stringCache, classLoader) localized to reduce field dereference cost.
  • PERFORMANCE: ToonReader.readInlineObject() char comparisons optimized; stringCache array localized to a local variable in hot parsing methods.
  • PERFORMANCE: ToonReader cache arrays (stringCache, numberCacheKeys, numberCacheValues) now reused across parse calls via ThreadLocal, eliminating per-parse array allocation.
  • PERFORMANCE: ToonReader.trimAsciiRange() now includes a fast path that skips trim logic when the input range is already trimmed.
  • PERFORMANCE: ToonReader.parseNumber() number cache arrays localized to reduce field access in the hot number-parsing loop.

... (truncated)

Commits
  • ba56e18 Update test dependencies: JUnit 5.14.2→5.14.3, Jackson 2.21.1→2.21.2
  • d464e7d Update json-io version references from 4.99.0 to 4.100.0
  • bd38334 Fix deadlock from circular static initialization between ReadOptionsBuilder a...
  • 22582f1 Update slide #7 benchmark numbers with 100K JIT warmup results
  • cc6a403 Mirror viz: opaque panels, floor-printed labels, stats, and orbit fixes
  • 446d782 Replace token estimator with real BPE tokenizer, fix furnace label overlap
  • da55f93 Update slide #7 with Java vs Python benchmark table
  • 98f1d48 Add sample selector to Visualize tab, sync selection across all views
  • 290c3dc Remove GAIG references, trim Visualize tab, link comparison page from README
  • a6ca7c1 Add TOON vs JSON interactive comparison page for GitHub Pages
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [com.cedarsoftware:json-io](https://github.com/jdereg/json-io) from 4.93.0 to 4.100.0.
- [Release notes](https://github.com/jdereg/json-io/releases)
- [Changelog](https://github.com/jdereg/json-io/blob/master/changelog.md)
- [Commits](jdereg/json-io@4.93.0...4.100.0)

---
updated-dependencies:
- dependency-name: com.cedarsoftware:json-io
  dependency-version: 4.100.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update java code labels Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants