From f8d5900cc1084250870b7bd7ff41fb54cd361577 Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Wed, 15 Nov 2023 10:15:49 -0500 Subject: [PATCH] Update injecting-values.md: mention other jsonnet import options --- docs/docs/jsonnet/injecting-values.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/docs/jsonnet/injecting-values.md b/docs/docs/jsonnet/injecting-values.md index 7d296cbe7..13124935f 100644 --- a/docs/docs/jsonnet/injecting-values.md +++ b/docs/docs/jsonnet/injecting-values.md @@ -17,7 +17,7 @@ There are three ways of doing so: Also check out the [official Jsonnet docs on this topic](https://jsonnet.org/ref/language.html#passing-data-to-jsonnet). -## JSON files +## Local files Jsonnet is a superset of JSON, it treats any JSON as valid Jsonnet. Because many systems can be told to output their data in JSON format, this provides a pretty @@ -38,6 +38,9 @@ local secrets = import "secrets.json"; > use it with untrusted code. > A safer, but more verbose, alternative is `std.parseJson(importstr 'path_to_json.json')` +You can also inject utf-8 strings or binary files directly, with `importstr` and `importbin`. +See the [Jsonnet docs on imports](https://jsonnet.org/learning/tutorial.html#imports) for more details. + ## External variables Another way of passing values from the outside are external variables, which are specified like so: