Skip to content
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

C api should expose jsonnet types #200

Open
mikedanese opened this issue May 29, 2016 · 2 comments
Open

C api should expose jsonnet types #200

mikedanese opened this issue May 29, 2016 · 2 comments

Comments

@mikedanese
Copy link
Contributor

To embbed jsonnet in an application as a config language, you often want it to produce a traversable structure. Right now you can evaluate and then reinterpret the char* with a different json parser which is painful:

https://github.com/mikedanese/overlay/blob/master/main.c#L195-L206

@mikedanese
Copy link
Contributor Author

It looks like this is what JsonnetJsonValue is intended to be?

@sparkprime
Copy link
Contributor

Yeah I was thinking that jsonnet_execute_snippet and friends should return a JsonnetJsonValue instead of a string so you don't have to parse it back again. Although that does go against the direction we've previously talked about with custom manifesters that always return string (for -S, --yaml-stream, and similar applications). In that case you always manifest in Jsonnet so the client should receive a string, not the intermediate JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants