4 ms·
I find Jsonnet incredibly useful to generate JSON while following a structured "don't repeat yourself" paradigm. It's a very good basis for a software applicat
by frumiousirc 8y ago
I find Jsonnet incredibly useful to generate JSON while following a structured "don't repeat yourself" paradigm. It's a very good basis for a software application configuration system. It enables me to define a JSON schema which is most suitable for consumption by software while not forcing humans to slog through that in order to author the configuration. Adding some function and structure tooling in a little Jsonnet library helps humans write very expressive documents that can be compiled down to the repetitive and exhaustive JSON level.
- ksmith14 8y agoThis is exactly where I've found it can be helpful as well. At a prior job we created extremely large, complicated CloudFormation templates in JSON that could have been made much simpler with Jsonnet and the ability to do comprehension and some other tricks to keep it DRY. A coworker ended up writing a bunch of Python scripts to templatize the CF templates (ugh). At my current job we ended up using Jsonnet as a configuration language for Apache Aurora jobs [1], which was also helpful when trying to make it easy for others to pick it up and create their own jobs from base templates. That being said, it can be frustrating to get going with and for some cases I do find myself having to trace through things very carefully in order to to figure out exactly what's going on. [1] https://github.com/benley/aurora-jsonnet https://github.com/benley/aurora-jsonnet