mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
This commit allows using ZON (Zig Object Notation) in a few ways. * `@import` can be used to load ZON at comptime and convert it to a normal Zig value. In this case, `@import` must have a result type. * `std.zon.parse` can be used to parse ZON at runtime, akin to the parsing logic in `std.json`. * `std.zon.stringify` can be used to convert arbitrary data structures to ZON at runtime, again akin to `std.json`.
26 lines
294 B
Plaintext
26 lines
294 B
Plaintext
.{
|
|
0.5,
|
|
123.456,
|
|
-123.456,
|
|
42.5,
|
|
|
|
5.0,
|
|
5,
|
|
-102.0,
|
|
-102,
|
|
|
|
'a',
|
|
'z',
|
|
|
|
36893488147419103231,
|
|
-36893488147419103231,
|
|
0x1ffffffffffffffff,
|
|
0x1ffffffffffffffff,
|
|
|
|
12_3.0E+77,
|
|
|
|
0x103.70p-5,
|
|
-0x103.70,
|
|
0x1234_5678.9ABC_CDEFp-10,
|
|
}
|