Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 19, 2026

Bumps com.cedarsoftware:json-io from 4.70.0 to 4.84.0.

Changelog

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

Revision History

4.83.0 - 2025-01-19

  • FEATURE: WriteOptionsBuilder - Added meta key prefix override methods
    • useMetaPrefixAt() - Forces @ prefix for all meta keys (@type, @id, @ref, etc.) even in JSON5 mode
    • useMetaPrefixDollar() - Forces $ prefix for all meta keys ($type, $id, $ref, etc.) even in standard JSON mode
    • getMetaPrefixOverride() - Returns the override character (@, $, or null for default behavior)
    • Default behavior: Standard JSON uses @ prefix (quoted), JSON5 uses $ prefix (unquoted)
    • In JSON5, @ cannot be used unquoted since it's not a valid ECMAScript identifier start character
    • Reading accepts all meta key variants (@type, @t, $type, $t) regardless of format used to write

4.83.0 - 2025-01-18

  • BUG FIX: JsonWriter.writeJsonObjectObject() - Fixed JSON5 unquoted keys not being applied
    • When serializing JsonObject instances directly, the json5UnquotedKeys option was ignored
    • Field names were always written with quotes regardless of JSON5 settings
    • Now uses consistent key writing logic with writeMapBody() - unquoted for valid ECMAScript identifiers
    • Also fixes potential escaping issues for field names containing special characters
  • PERFORMANCE: JsonWriter - Comprehensive hot path optimization
    • Hoisted 12 WriteOptions values to final member variables initialized at construction time
    • Pre-fetched: skipNullFields, json5TrailingCommas, json5UnquotedKeys, maxStringLength, prettyPrint, neverShowingType, alwaysShowingType, writeLongsAsStrings, json5SmartQuotes, maxIndentationDepth, indentationThreshold, indentationSize
    • Eliminated ~37 method calls per serialization cycle across all write paths
    • Restructured writeMapBody() and writeElements() loops to write comma BEFORE entries (except first), eliminating double hasNext() check per iteration
    • Replaced all internal getWriteOptions() calls with direct field access
    • Optimized tab() method to use pre-fetched indentation settings
  • PERFORMANCE: JsonParser - Zero-allocation string cache on cache hits
    • Replaced LinkedHashMap-based cache with array-based open addressing (2048 slots)
    • Computes hashCode directly from CharSequence without creating String
    • Uses contentEquals() to verify matches - only allocates String on cache miss
    • ~9% improvement in read performance
  • PERFORMANCE: JsonObject.indexOf() - Reduced linear search overhead
    • Lowered INDEX_THRESHOLD from 16 to 4 for earlier HashMap index creation
    • Added proactive index building when crossing threshold during put()
    • Reduces O(n²) cost when building objects with many fields
  • PERFORMANCE: WriteOptionsBuilder / ReadOptionsBuilder - Eliminated lambda allocations
    • Replaced computeIfAbsent(key, this::method) with manual get-then-put pattern
    • Method references create new lambda instances on every call, even on cache hits
    • Fixed in 5 locations: getAccessorsForClass, getCustomWriter, getDeepDeclaredFields, getDeepInjectorMap
  • PERFORMANCE: JsonWriter - New IdentityIntMap for reference tracking
    • Replaced IdentityHashMap<Object, Long> with lightweight IdentityIntMap
    • Uses open addressing with primitive int values (no Entry objects, no boxing)
    • Single System.identityHashCode() call per operation
    • ~10% improvement in write performance
  • PERFORMANCE: ObjectResolver.markUntypedObjects() - Optimized visited set
    • Now uses IdentitySet from java-util (high-performance Set using object identity)
    • Previously used workaround with IdentityIntMap, now uses proper add()/contains() semantics
    • 66% reduction in samples for this method, eliminated IdentityHashMap allocations
  • BUG FIX: ReadOptionsBuilder.integerTypeBigInteger() - Fixed to actually set BigInteger-only mode
    • Method was incorrectly setting Integers.BOTH instead of Integers.BIG_INTEGER
    • Now correctly forces all integers to return as BigInteger regardless of size
  • TESTING: Added comprehensive JsonParserErrorHandlingTest with 52 tests for parser edge cases
    • @items validation errors, invalid field name starts, token EOF/mismatch errors

... (truncated)

Commits
  • 208d16a Feature: Add meta key prefix override for JSON5/standard mode
  • a4f5f3a Update README.md version references to 4.83.0
  • 836c5d6 Performance: Cache additional ReadOptions values in Resolver
  • 276e6de Remove maxEnumNameLength option and optimize Resolver performance
  • abbdd1a Change BitSet JSON format to binary string for compactness
  • 438d84f Add custom writers and factories for BitSet, AtomicIntegerArray, AtomicLongAr...
  • b94569a Simplify enum handling by delegating to java-util Converter
  • 652285c Remove dead code in ObjectResolver.readWithFactoryIfExists()
  • c3935bf Refactor: Simplify ObjectResolver.resolveArray() to defer to traverseArray()
  • 39f8d4f Update dependencies and fix Resolver HashSet usage
  • 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 merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @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.70.0 to 4.84.0.
- [Changelog](https://github.com/jdereg/json-io/blob/master/changelog.md)
- [Commits](jdereg/json-io@4.70.0...4.84.0)

---
updated-dependencies:
- dependency-name: com.cedarsoftware:json-io
  dependency-version: 4.84.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 Jan 19, 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.

1 participant