Open MrSplinterRat opened 3 years ago
Hey @MrSplinterRat, totally, that seems like a reasonable fit. We could even add this as a Bloblang function, maybe it would look like this:
root = jsonnet("""{
person1: {
name: "Alice",
welcome: "Hello " + self.name + "!",
},
person2: self.person1 { name: "Bob" },
}""")
Which would allow you to do stuff like:
root = this.merge(jsonnet(file("./stuff/doc.libsonnet"))
Using jsonnet from within Bloblang seems like a very nice and sane idea to me, and it will be useful in many cases. But along with this, I think it would be nice if Jsonnet also appeared in the list of 'Processors' as it is - similar to how it is now done for Awk, jq and Sql. Thus, it will be possible to use both from Bloblang-scripts and as an independent Processor. I see this as the best solution. Do you see it the same way?
I was under the impression the Processors API is subject to change in V4. Adding it to processors means more code to port.
That should be fine, it'll be easy enough to migrate the current style over for internal code so I wouldn't say this is blocked on v4.
Hello!
Could you consider adding Jsonnet (https://jsonnet.org/) in 'Processors' ?
Thanks)