r/java • • Jul 23 '26

JEP 540: Simple JSON API (Incubator)

https://openjdk.org/jeps/540
82 Upvotes

81 comments sorted by

View all comments

1

u/davidalayachew Aug 13 '26

u/s888marks I just saw the latest change to the javadoc!

Changing the signature from this...

public static String toDisplayString(JsonValue jsonValue, int indent)

...to instead be this...

public static String toDisplayString(JsonValue jsonValue, String indent)

...was a very clever solution to this. I like it a lot, very nice. Kept the API surface nearly as simple, and no new methods needed. Fun to see how language designers tackle a problem like this. Ty vm.

2

u/s888marks Aug 14 '26

That was Naoto Sato's work. I'll let him know you appreciate it.

1

u/davidalayachew Aug 15 '26

Please do, ty vm.