The GitHub Actions job "Fory CI" on fory.git/main has failed.
Run started by GitHub user chaokunyang (triggered by chaokunyang).

Head commit for run:
e1052ef934a17c8e89bcca9f30e89282cdd5efb6 / Shawn Yang <[email protected]>
feat(json): support non-ASCII escaping (#4077)

## What does this PR do?

Adds instance-level `ForyJson.builder().escapeNonAscii(true)` for String
and UTF-8 output. The default remains false. Structured string values,
property names, map keys, enum names and subtype identifiers use
lowercase Unicode escapes, including surrogate pairs for supplementary
characters. Raw JSON keeps its original representation, and pretty
output remains selected per call.

The writers batch UTF-16 conversion with a fixed, lazily initialized
lookup table shared across instances. Generated writer metadata includes
the escape policy. This also fixes subtype-name hashing when a Latin1
input contains escaped non-Latin1 characters.

## How was this PR tested?

- Java JSON suite: 1,230 tests passed before the final writer
optimization; focused String/subtype tests and the annotation
processor's compiled Mixin pipeline passed again with the final
implementation.
- Scala 2/3, Scala 3 derived enums, Kotlin and existing KSP output tests
passed.
- Coverage includes String/UTF-8, generated/interpreted codecs,
compact/pretty, malformed surrogate recovery, Mixin/unwrapped fields and
raw JSON.
- The native-image fixture compiles; local native-image execution was
not run.
- The unchanged jsoniter-scala escaped-string fixture passes with the
new Fory adapter under Scala 2 and Scala 3. Final paired performance and
default-output regression measurements are in progress and will be added
to this PR.

## Does this PR introduce any user-facing change?

An opt-in builder setting, documented in the JSON mapping, custom codec,
Scala, Kotlin and native-image guides. Existing output is unchanged when
the setting is disabled.

Report URL: https://github.com/apache/fory/actions/runs/35628489023

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to