jsonnet
jsonnet copied to clipboard
Jsonnet file to Json
Hello, I installed Jsonnet lib by npm packages and created a Jsonnet file. Tell me please, How can I convert Jsonnet file to Json file on JS or TS.
var Jsonnet = require('jsonnet');
var jsonnet = new Jsonnet();
var result = jsonnet. ...
The npm package you're referring to is unofficial, and hasn't been updated in a long while, so we don't really keep track of it here.
Please take a look at the howto: https://www.npmjs.com/package/jsonnet#how-to-use. It seems to answer your question.
BTW We are open to creating official JS bindings in the future (probably based on go-jsonnet compiled with gopherjs). There's some discussion here: https://github.com/google/go-jsonnet/issues/295.