4 ms·
My employer (who I don’t speak for) used this for a long time. Im not normally particularly opinionated about tech choice, but I can very strongly say do not us
by GlickWick 4y ago
My employer (who I don’t speak for) used this for a long time. Im not normally particularly opinionated about tech choice, but I can very strongly say do not use jsonnet unless you enjoy adding an esoteric unsupported language to your job configs for no reason.
- spion 4y agoWhat would you use instead?
- GlickWick 4y agoAssuming you need something beyond basic JSON, a well-understood scripting language like JS or Python. Bazel if you want something more build-focused.
- techhazard 4y agoNot OP, but I can highly recommend just using the programming language you already use to make key-value map to and then converting that to JSON. That way you only have 1 syntax to worry about. In my case that’s Python (using dictionaries and json.dumps) You could also try for a templating framework (like jinja2) but then you have 3 syntaxes colliding: the programming language you call the templating engine with (e.g. Python for jinja2) the templating language itself (e.g. jinja2) and then JSON as well.
- spion 4y agoThis works for some languages but not others (some typed languages are particularly ill-suited to the problem of writing CLI tools to dump heterogenous dictionaries and/or objects with many optional fields)
- rixed 4y ago> do not do X for no reason. You are not contributing much here. Could you elaborate what problems they were trying to solve and what other problems were met?
- GlickWick 4y agoAnecdotes are absolutely a contribution. Regardless, the reason is exactly what I mentioned, it’s esoteric, specific, and not backed by a community of knowledge.