this post was submitted on 11 Jul 2025
214 points (95.7% liked)
Linux
56448 readers
498 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I've very barely dipped my toes in dbus before, and the option to have something else is on its face attractive (not a fan of XML and the late 90s/early aughties style of oop), but JSON for a system interface?
I mean, Kubernetes shows that yaml can work, but in this day and age I'd expect several options for serialisation, and for the default to be binary, not strings.
String serialisations are primarily for humans IMO, either as readers or writers. As writers we want something with comments (and preferably no "find the missing
}
" game), so for that most of us would prefer something like TOML if the data is simple enough, and actually Yaml for complexity at the level of Kubernetes—JSON manages to be even more of a PITA at that level.But machine-to-machine? Protobuf, cap'n'proto, postcard, even CBOR should all be alternatives to examine
100%
JSON is not the optimal solution for either humans nor for machines... it's a compromise in-between that is more complex to parse than most binary alternatives (and even some text-based ones, if the data can be represented in CSV tables for example), while also often requiring post-processing through beautifiers and similar to be able to visualize it cleanly for humans.
There are situations where it's the format that makes the most sense.. like in the web, where you are already working with javascript anyway. But it's not a golden bullet to use everywhere.
Yeah, JSON is essentially a side effect of having JavaScript already. It makes sense that it shows up a lot of places, especially web. But just like with JS, it's not really good, just ubiquitous.