# google/jsonnet

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/google-jsonnet).**

7,522 stars · 474 forks · Jsonnet · Apache-2.0

## Links

- GitHub: https://github.com/google/jsonnet
- Homepage: http://jsonnet.org
- awesome-repositories: https://awesome-repositories.com/repository/google-jsonnet.md

## Topics

`config` `configuration` `functional` `json` `jsonnet`

## Description

Jsonnet is a structured configuration generation language that extends JSON with variables, conditionals, and object-oriented features to create reusable templates. It is designed to eliminate duplication in configuration data by providing a data templating language that can produce structured output from concise, programmable templates.

The language distinguishes itself through an object-oriented inheritance model that allows field override, mixin composition, and self-referencing for modular configuration reuse. It supports lazy evaluation with thunks to defer computation until values are first accessed, and includes trampoline-based tail call optimization to handle deeply recursive functions without stack overflow. Jsonnet also provides a C-based embedding API with garbage-controlled memory management, import graph resolution for modular templates, and manifest-based serialization that transforms internal representations into multiple output formats.

The project covers capabilities for generating configuration data from templates, eliminating duplicate configuration values through inheritance and self-references, and creating parameterized functions that return objects or values for modular and DRY configuration logic. It includes tools for converting YAML to Jsonnet templates and managing Kubernetes object collections through object-based mappings. The system can produce output in JSON, YAML, INI, XML, and Python literal formats from a single template source.

Jsonnet is available through a C API for host program integration and a Python API for evaluating templates directly from Python code.

## Tags

### Operating Systems & Systems Programming

- [Structured Config Generators](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/file-system-management/file-systems/file-template-generators/host-data-template-generators/structured-config-generators.md) — Generates structured configuration data like JSON, YAML, and INI from concise, reusable templates. ([source](http://jsonnet.org/))

### Programming Languages & Runtimes

- [Data Configuration Languages](https://awesome-repositories.com/f/programming-languages-runtimes/templating-languages/data-configuration-languages.md) — A structured configuration generation language extending JSON with variables, conditionals, and object-oriented features.
- [C-Based Embedding APIs](https://awesome-repositories.com/f/programming-languages-runtimes/c-based-embedding-apis.md) — Provides a C-based embedding API for integrating the Jsonnet evaluation engine into host programs. ([source](https://jsonnet.org/js/libjsonnet.wasm))
- [Config Object Generators](https://awesome-repositories.com/f/programming-languages-runtimes/reusable-function-patterns/config-object-generators.md) — Creates parameterized functions that return objects for generating consistent and modular configuration. ([source](http://jsonnet.org/))
- [Lazy Evaluation](https://awesome-repositories.com/f/programming-languages-runtimes/deferred-execution/lazy-evaluation.md) — Implements lazy evaluation with thunks to defer computation until values are first accessed.

### Data & Databases

- [JSON Serializers](https://awesome-repositories.com/f/data-databases/data-export-utilities/json-serializers.md) — Serializes structured data into JSON documents for consumption by applications and tools. ([source](http://jsonnet.org/articles/output-formats.html))
- [Trampolining](https://awesome-repositories.com/f/data-databases/data-transformation-functions/recursive-processors/recursive-logic-implementations/iterative-recursion-simulation/trampolining.md) — Optimizes recursive function calls using trampolines to avoid stack overflow.
- [Recursive Descent Parsers](https://awesome-repositories.com/f/data-databases/data-transformation-functions/recursive-processors/recursive-logic-implementations/recursive-descent-parsers.md) — Parses the language grammar using a recursive descent parser that builds an abstract syntax tree.

### Development Tools & Productivity

- [Configuration Inheritance](https://awesome-repositories.com/f/development-tools-productivity/configuration-inheritance.md) — Reuses and overrides object fields via inheritance and self-references to avoid repeating common configuration values. ([source](http://jsonnet.org/))
- [Configuration Function Generators](https://awesome-repositories.com/f/development-tools-productivity/programmable-build-logic/configuration-function-generators.md) — Creates parameterized functions that return objects or values for modular and DRY configuration logic.
- [Template Evaluation APIs](https://awesome-repositories.com/f/development-tools-productivity/python-api-integrations/evaluation-engine-apis/template-evaluation-apis.md) — Ships a Python API for evaluating Jsonnet templates and returning JSON strings. ([source](https://jsonnet.org/js/libjsonnet.wasm))
- [Import Callback Systems](https://awesome-repositories.com/f/development-tools-productivity/project-imports/external-file-importers/import-callback-systems.md) — Resolves and caches external file imports via a callback system for modular template dependencies.

### DevOps & Infrastructure

- [Reusable Configuration Blocks](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-distribution-and-sharing/reusable-configuration-blocks.md) — Creates parameterized functions that return objects or values for modular and DRY configuration logic. ([source](https://jsonnet.org/))
- [Inheritance-Based Config Deduplication](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-resolution-engines/configuration-overrides/proxy-config-overrides/platform-specific-config-overrides/inheritance-based-config-deduplication.md) — Eliminates duplicate configuration values through object inheritance and self-referencing.
- [Template-Based Kubernetes Generators](https://awesome-repositories.com/f/devops-infrastructure/kubernetes-resource-generators/template-based-kubernetes-generators.md) — Generates structured JSON configuration for Kubernetes objects from reusable templates. ([source](http://jsonnet.org/articles/kubernetes.html))

### Software Engineering & Architecture

- [Object Inheritance](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/object-oriented-foundations/inheritance-mechanisms/object-inheritance.md) — Provides an object-oriented inheritance model with field override, mixin composition, and self-referencing.
- [Config Duplication Eliminators](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/object-oriented-foundations/inheritance-mechanisms/object-inheritance/config-duplication-eliminators.md) — Eliminates duplicate configuration values through inheritance and self-references. ([source](http://jsonnet.org/))
- [YAML Serializers](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/yaml-configuration-files/yaml-serializers.md) — Serializes structured data into YAML format for interoperability with YAML-based toolchains. ([source](http://jsonnet.org/articles/output-formats.html))
- [Multi-Format Manifest Serializers](https://awesome-repositories.com/f/software-engineering-architecture/declarative-manifest-systems/manifest-transformations/multi-format-manifest-serializers.md) — Serializes structured data into JSON, YAML, INI, and XML via manifest functions.

### User Interface & Experience

- [Configuration Data Templates](https://awesome-repositories.com/f/user-interface-experience/layout-utilities/presentation-engines/template-engines/configuration-and-integration/custom-template-integrations/generation-templates/configuration-data-templates.md) — Generates structured configuration data from reusable templates with object-orientation and functions. ([source](http://jsonnet.org/))

### Content Management & Publishing

- [Multi-Format Output Converters](https://awesome-repositories.com/f/content-management-publishing/multi-format-output-converters.md) — Produces configuration in JSON, YAML, INI, and other formats from a single template source. ([source](http://jsonnet.org/))

### Graphics & Multimedia

- [Multi-Format Output Renderers](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/multi-format-output-renderers.md) — Renders the same template into JSON, YAML, INI, and other formats simultaneously. ([source](http://jsonnet.org/))
