Skip to content

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

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

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

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 9, 2026

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

Release notes

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

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

  • Field-context type resolution — enums, integer map keys, and EnumSets work consistently across JSON and TOON via generic type inference from seedIncrementalContainerMetadata().
  • JsonObject — internal storage mode consolidated from two boolean flags into a single byte with four named states; cached effectiveValues eliminates repeated conditional dispatch.
  • TOON same-type round-trip — Converter-supported types written as bare strings without $type; read back uses String → OriginalType converter path.

Performance

  • JsonIo.toToon() — defaults to cycleSupport(false), skipping traceReferences() pre-pass for ~35-40% faster TOON serialization.
  • ToonReader.cacheSubstring() — probes cache by source range before materializing substring, eliminating allocation on cache hits.
  • ToonReader — lazy trimmed line materialization, buffer-direct scalar parsing, and combined field[N]... header parsing from existing slices.
  • ToonReader — TOON string/input-stream reads reuse FastReader character buffer via scoped buffer recycler.
  • ToonWriter — tabular POJO detection validates uniformity via WriteFieldPlan accessors; row values streamed from accessors, eliminating N intermediate map allocations.
  • JsonWriter — tracking structures allocated lazily based on cycleSupport mode, avoiding ~6 KB wasted allocations when disabled.
  • JsonWriter.writeCollectionElement() — fast-paths Integer, Float, Short, Byte directly to writePrimitive().
  • JsonWriter.writeCollection() — indexed list.get(i) for RandomAccess lists instead of Iterator allocation.
  • JsonObject — deferred keys[]/values[] allocation using shared empty sentinel; appendFieldForParser() avoids redundant null assignments.

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: 1 write fail (same custom writer edge case as json-io), 0 read fails.

Install

... (truncated)

Changelog

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

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.
  • PERFORMANCE: ToonReader.readInlineObject() two separate indent checks merged into a single != comparison.
  • MAINTENANCE: Update Jackson test dependency from 2.19.4 to 2.21.1; remove redundant jackson-core and jackson-annotations declarations (pulled transitively via jackson-databind).

4.96.0 - 2026-02-28

  • FEATURE: Spring Boot starter — expanded YAML configuration properties. All commonly used WriteOptions and ReadOptions settings are now configurable via application.yml without writing Java code. New write properties: force-map-output-as-two-arrays, write-enum-as-json-object, cycle-support, json5, date-format, indentation-size, show-root-type-info, meta-prefix, toon-delimiter. New read properties: use-unsafe, floating-point, integer-type. Advanced/internal tuning settings remain available through ReadOptionsCustomizer/WriteOptionsCustomizer beans.
  • IMPROVEMENT: @type elimination on write now considers @IoDeserialize(as=X) and @IoTypeInfo(X) annotations. When the runtime type of a field matches the annotation-specified type, @type is omitted from JSON output because the reader can infer the correct type from the annotation. This produces smaller JSON without sacrificing round-trip fidelity.
  • IMPROVEMENT: AnnotationResolver now uses ClassUtilities.forName() instead of Class.forName() for external annotation detection, ensuring proper classloader resolution in OSGi and JPMS environments.
  • FEATURE: ToonWriter now uses the same WriteFieldPlan / Accessor abstraction as JsonWriter. This gives TOON serialization automatic support for @IoGetter, @IoFormat, @IoAnyGetter, and all other write-side annotations. Previously ToonWriter used direct Field.get() which bypassed custom getter methods and format patterns.
  • PERFORMANCE: Accessor.retrieve() now uses sticky fallback flags for lambda/VarHandle/MethodHandle paths; once an optimized path fails, it is bypassed on subsequent calls instead of repeatedly throwing/falling back.
  • FEATURE: AnnotationResolver — annotation-based serialization control. json-io now supports 25 annotations in com.cedarsoftware.io.annotation:
    • @IoProperty("name") — rename a field in JSON output and accept the renamed key on read.
    • @IoIgnore — exclude a field from serialization and deserialization.
    • @IoIgnoreProperties({"a","b"}) — class-level field exclusion by name.
    • @IoAlias({"alt1","alt2"}) — accept alternate JSON property names on read.
    • @IoPropertyOrder({"x","y"}) — control field order during serialization.

... (truncated)

Commits
  • 1d731bc Add JSON5 as 5th serialization path in TestUtil and update changelog
  • 5578a37 Add @​IoShowType annotation to force type emission on polymorphic fields
  • 5dc851f Update changelog for 4.98.0 release
  • a7407ac Add performance reports and documentation from optimization sessions
  • 89287b1 Document TOON same-type round-trip design in changelog
  • 23e2393 Fix ToonWriter type metadata indentation and EnumSetFactory generic type infe...
  • 9128807 Fix ToonWriter char[] serialization and complex key StackOverflow
  • a34748a Fix ToonWriter StackOverflow on maps with complex cyclic keys
  • 4612fb7 Add TOON as 4th serialization path in TestUtil
  • cc29650 Eliminate Iterator allocations in JsonWriter write loops
  • 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.98.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...v4.98.0)

---
updated-dependencies:
- dependency-name: com.cedarsoftware:json-io
  dependency-version: 4.98.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 Mar 9, 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