-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example for Serde deserialisation #142
Comments
@Timmmm, in the meantime, you can look at this snippet from a project using this library. I hope it helps! |
I was more thinking something like the example in |
It is possible, but jsonnet is much more powerful than json5, and should not be/not intended to be used like Configuration may include other files (and assuming current directory to be CWD is bad and insecure), then there is more types available than serde-json supports, I.e functions. Also, most of the time you want to supply jsonnet with tla/ext vars and so on. |
My understanding was that the result of executing a Jsonnet file would be an ordinary JSON data object. So there must be a way to execute it and then load that with
Agreed, I'd say any API should require explicitly setting the current directory and error on loading external files if you didn't. Otherwise it's not fail-safe (c.f. |
I think most people using the Rust library version of this would want to just take
serde-json
code and switch it to jsonnet. Unfortunately I can't figure out how to do that. An example would be great! (I assume it is possible.)The text was updated successfully, but these errors were encountered: