Software Alternatives & Reviews

YAML VS Jsonnet

Compare YAML VS Jsonnet and see what are their differences

YAML logo YAML

YAML 1.2 --- YAML: YAML Ain't Markup Language

Jsonnet logo Jsonnet

A powerful DSL for elegant description of JSON data.
  • YAML Landing page
    Landing page //
    2021-10-22
  • Jsonnet Landing page
    Landing page //
    2023-05-26

YAML videos

YAML is for Computers. ksonnet is for Humans - Bryan Liles, Heptio (Any Skill Level)

More videos:

  • Review - YAML Release Pipelines in Azure DevOps - PRE06
  • Tutorial - Azure DevOps - How to Create a YAML Pipeline in DevOps (YAML Pipelines)

Jsonnet videos

Jsonnet

More videos:

  • Review - Using Jsonnet to Package Together Dashboards, Alerts and Exporters - Tom Wilkie
  • Review - Webinar: Writing Less YAML – Using jsonnet and kubecfg to Manage Kubernetes Resources

Category Popularity

0-100% (relative to YAML and Jsonnet)
Configuration Management
59 59%
41% 41
Mobile Apps
61 61%
39% 39
Productivity
66 66%
34% 34
Software Development
47 47%
53% 53

User comments

Share your experience with using YAML and Jsonnet. For example, how are they different and which one is better?
Log in or Post with

Social recommendations and mentions

YAML might be a bit more popular than Jsonnet. We know about 36 links to it since March 2021 and only 32 links to Jsonnet. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

YAML mentions (36)

  • Docker compose, orchestrating and automating services
    First of all, create a file in the root project directories called compose.yaml. YAML is a text format that uses indentation to specify dependencies between configuration options. Be aware that incorrect indentation will cause problems with executing commands properly. - Source: dev.to / 5 days ago
  • Kubernetes Through the Developer's Perspective
    Most commonly written in YAML, these files are large and complex to read and understand. And being written in YAML comes with its challenges (and quirks) since it is an additional programming language that devs need to learn. - Source: dev.to / about 1 month ago
  • A View on Functional Software Architecture
    Note, that this file is a Markdown and YAML file at the same time, and as such human- and machine-readable, if the fields are filled carefully. - Source: dev.to / 5 months ago
  • Exploring the code behind Docusaurus
    Front matter is a bit of text at the start of a file (YAML to be exact) that is placed between two ---. - Source: dev.to / 6 months ago
  • topoconfig: enhancing config declarations with graphs
    Meanwhile, formats have been evolving (JSON5, YAML), config entry points are constantly changing. These fluctuations, fortunately, were covered by tools like the cosmiconfig. - Source: dev.to / 7 months ago
View more

Jsonnet mentions (32)

  • A Reasonable Configuration Language
    Jsonnet[1] and kapitan[2] are the tools I currently use. Their learning curve is not optimal (and I tried to contribute to smoothen it with a jsonnet course[3] and a 'get started wit kapitan' blog post[4]), but once used to it it's hard to do without, and their combination makes them even more useful (esp. If you deploy K8s). In Ruud's case, Jsonnet might have been worth looking at as Hashicorp tools can be... - Source: Hacker News / 3 months ago
  • Pkl, a Programming Language for Configuration
    Kubernetes config is a decent example. I had ChatGPT generate a representative silly example -- the content doesn't matter so much as the structure: https://gist.github.com/cstrahan/528b00cd5c3a22e3d8f057bb1a75ea61 Now consider 100s (if not 1000s) of such files. I haven't given Pkl an in depth look yet, but I can say that the Industry Standard™ of "simple YAML" + string substitution (with delicate, error prone... - Source: Hacker News / 3 months ago
  • What Is Wrong with TOML?
    Maybe you'd like jsonnet: https://jsonnet.org/ I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev). Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/ A few years ago I did a small comparison by re-implementing one of my simpler ansible... - Source: Hacker News / 8 months ago
  • That people produce HTML with string templates is telling us something
    Apologies for the lack of context, and for missing this comment until today. Both are tools for defining kubernetes manifests (which are YAML) in a reusable manner. Jsonnet is a formally specified extension of JSON. It’s essentially a functional programming language (w/some object oriented features) that generates config files in JSON/YAML/etc, so it’s straightforward to determine whether an input file is valid,... - Source: Hacker News / 11 months ago
  • TOML: Tom's Obvious Minimal Language
    I like Google's Jsonnet [1], which has all of this except for 4. Jsonnet is quite mature, with fairly wide language adoption, and has the benefit of supporting expressions, including conditionals, arithmetic, as well as being able to define reusable blocks inside function definitions or external files. It's not suitable as a serialization format, but great for config. It's popular in some circles, but I'm sad that... - Source: Hacker News / 11 months ago
View more

What are some alternatives?

When comparing YAML and Jsonnet, you can also consider the following products

TOML - TOML - Tom's Obvious, Minimal Language

Dhall Configuration Language - A non-repetitive alternative to YAML

JSON - (JavaScript Object Notation) is a lightweight data-interchange format

Protobuf - Protocol buffers are a language-neutral, platform-neutral extensible mechanism for serializing structured data.

Messagepack - An efficient binary serialization format.

XML - Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding...