# ZON Extensions

**URL:** <https://ziggit.dev/t/zon-extensions/12135>\
**Category:** Brainstorming\
**Tags:** language\
**Created:** [September 21, 2025, 7:53am UTC](https://ziggit.dev/t/zon-extensions/12135 "2025-09-21T07:53:46Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [September 21, 2025, 1:36pm UTC](https://ziggit.dev/t/zon-extensions/12135/4 "2025-09-21T13:36:21Z")

</div>

> [@jeffective](#):
>
> Functions in ZON:
> 
> ```zig
> .{
> .username = "kj4tmp",
> .joined = date("Jan 2, 1970"),
> }
> 
> ```

This reminds me of:

> [@Ziggy: a JSON / YAML / TOML replacement](https://ziggit.dev/t/ziggy-a-json-yaml-toml-replacement/3313):
>
> I started working on this project because I need a frontmatter data format for Zine, my static site generator, but I’m trying to make it a general purpose data format that should be an improvement over JSON & co for most similar use cases. Key features: distinction between structs vs maps unions of structs, so that you don’t have to rely on shape matching I have already created a tree sitter grammar, an LSP and a bunch of parsers for it. There’s one last feature (custom string literals) tha…

Which would allow you to write:

```zig
.username = "kj4tmp",
.joined = @date("Jan 2, 1970"),

```

I am not so sure whether I like the idea of having includes in data files, seems like you can easily get back to a mess of files with that again.

But technically you could already write `@import("apples.zon")`, however I don’t know whether that would make a lot of sense with ziggy, because there it would just be a custom string literal, so you would have to interpret the meaning of it on the read side manually (or add it as a hack to ziggy, which probably wouldn’t fit its more strict/rigorous structuring, e.g. ziggy schema seems stricter than json schema (which is a good thing, but wouldn’t make it easy to hack in includes in a general way)).

However if you don’t actually need general includes, just sometimes have to refer to some external file in some places, then you could do that in Ziggy by using a union where one element type is some concrete type and another is a reference type that just describes the path or id to the external file.

---

_[View the full topic](https://ziggit.dev/t/zon-extensions/12135)._
