Jsonnet from scratch

Ease your JSON and YAML files generation

Understand how Jsonnet works, and be productive writing Jsonnet code. Based on real worl experience.

What you’ll learn

  • Understand the benefits of using Jsonnet.
  • Learn about all Jsonnet features.
  • Flexibly produce JSON.
  • Structure you Jsonnet code for flexibility.
  • Manage your jsonnet code and its dependencies in your source versioning system.
  • Understand how Jsonnet is executed.

Course Content

  • Introduction –> 1 lecture • 6min.
  • Jsonnet Syntax And Data Types –> 2 lectures • 17min.
  • Understanding Jsonnet execution –> 1 lecture • 5min.
  • Jsonnet functions –> 2 lectures • 11min.
  • Jsonnet Objects –> 3 lectures • 13min.
  • Array and Object Comprehension –> 2 lectures • 11min.
  • Parameterised runs –> 1 lecture • 4min.
  • Writing, using and managing libraries –> 2 lectures • 11min.
  • Generating error –> 1 lecture • 2min.
  • Addendum: Installing Jsonnet –> 1 lecture • 3min.

Auto Draft


Understand how Jsonnet works, and be productive writing Jsonnet code. Based on real worl experience.

Jsonnet is a programming language used to generate JSON and YAML content efficiently and with flexibility. JSON and YAML configuration formats are used pervasilvely. From docker-compose to Hashicorp tools like Vagrant and Terraform. Jsonnet is a tool of interest for anyone needing to generate JSON or YAML configuration. As such it is no surprise to see it is used by some tools helping to manage complex Kubernetes configurations.

This training helps you get productive rapidly with the Jsonnet language. It covers from the basics to the advanced techniques:

  • Syntax and data types: The Jsonnet syntax is close to JSON. Actually a JSON document is a valid Jsonnet program! Discover the syntax along with the data types supported by Jsonnet.
  • Understanding the Jsonnet execution: When you know the syntax, it is tume to understand how Jsonnet code is executed. From Jsonnet expressions to JSON manifestation
  • Jsonnet functions: Learn to define and use function to avoid repetitions and modularize your code
  • Jsonnet objects: Discover the power of combining objects, and more importantly, understand how it works. Learn about inheritances, and how to augment an object’s existing value
  • Comprehension: Master array and object comprehension, allowing you to transform arrays to other arrays and even objects
  • Parameterised runs: See how you can pass parameters to a Jsonnet program
  • Libraries: Organise your code by authoring and using libraries. Manage your project’s dependencies with the Jsonnet Bundler, the package manager. Get tips on how to manage your Jsonnet with your source code versioning system.
  • Generate errors: Learn how to interrupt the Jsonnet execution early
Get Tutorial