mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 07:10:41 +01:00
Fix java/kotlin usage examples (#372)
Co-authored-by: Fruxz <28064149+TheFruxz@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,7 @@ public class JavaConfigExample {
|
||||
Config config;
|
||||
try (var evaluator = ConfigEvaluator.preconfigured()) { // <1>
|
||||
config = evaluator.evaluate(
|
||||
ModuleSource.text("pigeon { age = 5; diet = \"Seeds\" }")); // <2>
|
||||
ModuleSource.text("pigeon { age = 5; diet = new Listing { \"Seeds\" } }")); // <2>
|
||||
}
|
||||
var pigeon = config.get("pigeon"); // <3>
|
||||
var age = pigeon.get("age").as(int.class); // <4>
|
||||
|
||||
Reference in New Issue
Block a user