On Sat, 22 Aug 2026 06:54:04 GMT, Alan Bateman <[email protected]> wrote:
>> Naoto Sato has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Merge remote-tracking branch 'jdk-sandbox/json' into
>> JDK-8381976-Implementation-for-Simple-JSON-API
>> - Print ASCII non-control characters as is in error messages
>
> src/jdk.incubator.json/share/classes/jdk/incubator/json/impl/JsonParser.java
> line 560:
>
>> 558: return Character.isISOControl(c) ?
>> 559: String.format(Locale.ROOT, "\\u%04X", (int)c) :
>> 560: Character.toString(c);
>
> There are Unicode line and paragraph separators that the isISOControl test
> will let through, e.g. `Json.parse(""\" + Character.toString(0x2028) + """)`.
> It might be simpler to only use Character.toString for the printable ASCII (c
> >= 0x20 && c <= 0x7E), otherwise this method will end up growing legs.
Thanks. Forgot those non-Latin-1 controls. Will use the explicit ASCII range.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32282#discussion_r3845354863