Add jdk28-preview module: JDK 28 early-access build, value classes, strict init flag, PEM, JSON incubator
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gth99spB1CzQmBFofXmU4Z
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# 05-json-incubator (JEP 540): JsonDemo.java on JDK 28
|
||||
--- module and API surface:
|
||||
jdk.incubator.json@28-ea
|
||||
exports jdk.incubator.json
|
||||
requires java.base mandated
|
||||
public static jdk.incubator.json.JsonValue parse(java.lang.String);
|
||||
public static jdk.incubator.json.JsonValue parse(char[]);
|
||||
public static java.lang.String toDisplayString(jdk.incubator.json.JsonValue, java.lang.String);
|
||||
--- without --add-modules:
|
||||
src/JsonDemo.java:1: error: package jdk.incubator.json is not visible
|
||||
import jdk.incubator.json.*;
|
||||
--- with --add-modules jdk.incubator.json:
|
||||
name = Ada
|
||||
second language = fr
|
||||
age + 1 = 37
|
||||
missing key -> Optional.empty
|
||||
{
|
||||
"name": "Ada",
|
||||
"langs": [
|
||||
"en",
|
||||
"fr"
|
||||
],
|
||||
"age": 36
|
||||
}
|
||||
Reference in New Issue
Block a user