diff options
| author | Mason Remaley <mason@anthropicstudios.com> | 2024-11-04 14:03:36 -0800 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-02-03 09:14:37 +0000 |
| commit | 13c6eb0d71b253cc55a667e33dbdd4932f3710f1 (patch) | |
| tree | 8c6eee3ffc63cb6b0ec8f6a4407af3a94a949c64 /test/behavior/zon/array.zon | |
| parent | 953355ebeab881abff4a2c9315daa4fbb290d733 (diff) | |
| download | zig-13c6eb0d71b253cc55a667e33dbdd4932f3710f1.tar.gz zig-13c6eb0d71b253cc55a667e33dbdd4932f3710f1.zip | |
compiler,std: implement ZON support
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`.
Diffstat (limited to 'test/behavior/zon/array.zon')
| -rw-r--r-- | test/behavior/zon/array.zon | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/behavior/zon/array.zon b/test/behavior/zon/array.zon new file mode 100644 index 0000000000..8ee5ebe0f5 --- /dev/null +++ b/test/behavior/zon/array.zon @@ -0,0 +1 @@ +.{ 'a', 'b', 'c', 'd' } |
