On Wed, 19 Aug 2026 20:29:55 GMT, Naoto Sato <[email protected]> wrote:

>> This PR implements [JEP 540: Simple JSON API 
>> (Incubator)](https://openjdk.org/jeps/540).
>> 
>> It adds the `jdk.incubator.json` module which provides APIs for reading and 
>> writing JSON documents as specified by [RFC 
>> 8259](https://datatracker.ietf.org/doc/html/rfc8259). This is an incubating 
>> API.
>> 
>> API documentation: 
>> https://cr.openjdk.org/~naoto/json/javadoc/api/jdk.incubator.json/module-summary.html
>> Co-authored-by: Justin Lu 
>> ([@justin-curtis-lu](https://github.com/justin-curtis-lu))
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Naoto Sato has updated the pull request incrementally with four additional 
> commits since the last revision:
> 
>  - Merge remote-tracking branch 'jdk-sandbox/json' into 
> JDK-8381976-Implementation-for-Simple-JSON-API
>  - Use %04X format for invalid hex digit error message
>  - Update outdated comment in toPath
>  - Renamed `JsonValueImpl` to `JsonValueSupport`

src/jdk.incubator.json/share/classes/jdk/incubator/json/impl/JsonParser.java 
line 138:

> 136:             if (members.containsKey(name)) {
> 137:                 throw failure(nameStart, nameLine, nameLineStart,
> 138:                     "Duplicate member name: \"%s\" was already 
> parsed".formatted(name), startO, true);

This is another case where a name containing a LF or other interesting 
characters makes for a confusing problematic exception message.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/32282#discussion_r3819798248

Reply via email to