Jsonnet – A data templating language
11–20 of 90 posts
Re: Jsonnet – A data templating language
#12We have just had an article hitting nearly the top on not to use JSON for config https://arp242.net/weblog/json_as_configuration_files-_pleas...
That's the reason I posted this, since this is kind of using, without the drawbacks (of not having comments etc) I wonder if folks had had experience using it for kubernetes configs like https://jsonnet.org/articles/kubernetes.html
Re: Jsonnet – A data templating language
#13Why would I use this over, say, Jinja? Do I really want imperative code in my config files? And if so, why not just use vanilla JS?
Re: Jsonnet – A data templating language
#14We have just had an article hitting nearly the top on not to use JSON for config https://arp242.net/weblog/json_as_configuration_files-_pleas...
Re: Jsonnet – A data templating language
#15Why would I use this over, say, Jinja? Do I really want imperative code in my config files? And if so, why not just use vanilla JS?
Jinja is a text templating language. A valid ninja template may not produce valid JSON/YAML/etc. Sometimes you need more power than a config language gives you, specifically when you want reuse. Helm uses something like jinja, but the template files are often complex and messy (and they are looking into supporting Lua to deal with these problems). CloudFormation built function semantics on top of JSON/YAML twice: onc…
Re: Jsonnet – A data templating language
#16Earlier quoted context omitted.
Jinja is a text templating language. A valid ninja template may not produce valid JSON/YAML/etc. Sometimes you need more power than a config language gives you, specifically when you want reuse. Helm uses something like jinja, but the template files are often complex and messy (and they are looking into supporting Lua to deal with these problems). CloudFormation built function semantics on top of JSON/YAML twice: onc…
Why not jq, then?
Re: Jsonnet – A data templating language
#17Why would I use this over, say, Jinja? Do I really want imperative code in my config files? And if so, why not just use vanilla JS?
Re: Jsonnet – A data templating language
#18Some devs from my company just recently published https://jkcfg.github.io/ , building on lessons learned from many years of configuring Kubernetes. Since we are discussing JS for config management.
Re: Jsonnet – A data templating language
#19Why would I use this over, say, Jinja? Do I really want imperative code in my config files? And if so, why not just use vanilla JS?
Why don't you take a look at the link? It has a page specifically addressing these questions: https://jsonnet.org/articles/comparisons.html
Re: Jsonnet – A data templating language
#20Earlier quoted context omitted.
Why don't you take a look at the link? It has a page specifically addressing these questions: https://jsonnet.org/articles/comparisons.html
The link doesn’t specifically address the question “why not use vanilla JS?”