←back to thread

31 points epiceric | 1 comments | | HN request time: 0.199s | source

An MIT-licensed human-friendly extension of JSON with quality-of-life improvements (comments, trailing commas, unquoted keys), extra types (tuples, bytes, raw strings), and semantic identifiers (think type annotations).

Built in Rust, with bindings for Python and WebAssembly, as well as syntax highlighting in VSCode. I made it for those like me who hand-edit JSONs and want a breath of fresh air.

It's at a good enough point that I felt like sharing it, but there's still plenty I wanna work on! Namely, I want to add (real) Node support, make a proper LSP with auto-formatting, and get it out there before I start thinking about stabilization.

Show context
anonzzzies ◴[] No.45788275[source]
Why no date and time?
replies(1): >>45788776 #
epiceric ◴[] No.45788776[source]
My reasoning is that they are normally transmitted as strings in JSON, and you could use an identifier like DateTime("2025-11-02T02:33:00Z") if you need to be explicit.

Making them part of the language would increase the complexity of parsers - how would you validate that a date is actually valid? It's doable (YAML and TOML do it, after all) but requires extra steps.

replies(1): >>45790314 #
epiceric ◴[] No.45790314[source]
Although given the feedback I've received, date/time might get included into the format.
replies(2): >>45791343 #>>45807165 #
1. djfobbz ◴[] No.45807165[source]
DateTime handling, especially with timezone offsets, is crucial. If your format gets that right, it'll stand out...most formats still mess up time zones or rely on loose string parsing. It's key for stuff like logs, scheduling, or syncing data across systems. DuperGZ right after that! ;)