Generated by GPT-5-mini| Jsonnet | |
|---|---|
| Name | Jsonnet |
| Paradigm | Configuration, data templating, functional |
| Designer | |
| First appeared | 2014 |
| Latest release | (see project repositories) |
| Typing | Dynamic |
| License | Apache License 2.0 |
Jsonnet
Jsonnet is a domain-specific configuration language focused on generating JSON-like data structures with programmable abstractions. It combines ideas from functional programming, template languages, and data serialization to produce configurable manifests for systems such as Kubernetes, Terraform, Docker, Ansible and other orchestration or deployment tools. Jsonnet tooling integrates with ecosystems maintained by organizations like Google, CNCF, HashiCorp, Red Hat and cloud providers such as Amazon Web Services, Microsoft Azure and Google Cloud Platform.
Jsonnet is designed to simplify the creation of structured configuration by allowing reusable functions, variables, and imports while still producing strict JSON output consumable by tools like Kubernetes API and Terraform Cloud. It addresses repetitive configuration authoring challenges commonly found in projects using YAML or JSON Schema by introducing programmatic constructs reminiscent of Haskell and JavaScript expression languages. The language is used across projects at organizations including Google LLC, GitHub, Stripe, Capital One, Shopify and research groups at universities such as Stanford University and MIT.
Jsonnet provides first-class functions, object composition, array operations, and string interpolation akin to features in ECMAScript and Lua. It supports imports, local bindings, and mixin-style inheritance comparable to patterns in C++ multiple inheritance and Python mixins, enabling configuration reuse across repositories like those managed with GitHub Actions or GitLab CI. Jsonnet's error reporting and evaluation model are influenced by functional languages like OCaml and F#, with lazy-ish evaluation of object fields analogous to some features in Nix and Bazel configuration. The type discipline is dynamic but predictable, drawing comparisons to Ruby and Node.js ecosystems; static analysis tools and linters integrate with editors such as Visual Studio Code, Vim, and Emacs through language servers embraced by Microsoft and community maintainers.
The reference implementation of Jsonnet is written in C++ with bindings for languages like Go, Python, Java, Rust and Node.js to facilitate integration into CI/CD pipelines run on platforms such as Jenkins, CircleCI, Travis CI and Argo CD. Tooling includes formatters, linters, evaluators and bundlers developed by contributors from companies including Google and open-source projects hosted on GitHub. IDE support comes from extensions produced by maintainers connected to Microsoft and community contributors familiar with Language Server Protocol and editor ecosystems like JetBrains and Sublime Text.
Jsonnet is used for templating manifests in container orchestration stacks built with Kubernetes, generating infrastructure-as-code snippets for Terraform modules, parameterizing Docker Compose files, and producing configuration consumed by Prometheus and Grafana. Enterprises such as Spotify, Airbnb, Dropbox, and Lyft have employed Jsonnet or Jsonnet-inspired tools within platform engineering efforts similar to how Netflix and Uber built internal configuration systems. Academic and research projects at institutions like UC Berkeley and Carnegie Mellon University use Jsonnet in reproducible experiment pipelines comparable to reproducibility initiatives like those at NeurIPS and ICML workshops.
A simple Jsonnet expression defines objects and arrays with functions comparable in expressiveness to snippets written for ECMAScript 2015 or configuration templates used by Ansible playbooks. Examples circulated in repositories on GitHub and demonstrated at conferences like KubeCon and Google I/O show composition patterns related to Helm charts, illustrating how Jsonnet can emit multiple Kubernetes resources from parameterized templates. Community examples often integrate with continuous delivery flows managed by Flux or Spinnaker and show interoperability with Consul, Vault, and Istio service mesh configurations.
Jsonnet originated as a project within Google and was open-sourced to address practical configuration duplication and templating problems observed in large-scale infrastructure projects. Its development has been driven by contributors affiliated with companies such as Google, CoreOS, Red Hat and independent maintainers coordinating on GitHub and through standards discussions in cloud-native communities under the auspices of CNCF-adjacent forums. Influences include earlier templating and configuration efforts like Jinja, Mustache, YAML Anchors, and functional configuration languages such as Nix. Jsonnet has been presented in talks at conferences hosted by organizations including KubeCon, GopherCon, FOSDEM and Strange Loop, and continues to evolve through pull requests, issues and community RFC-style proposals managed by core contributors.
Category:Configuration languages Category:Data serialization