-
Notifications
You must be signed in to change notification settings - Fork 80
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
Print JSON data structures as a value using CLI #31
Comments
Hi @metmajer, to make sure I understand the ask, can you please share a small example program that demonstrates the issue? |
Hi @cbroglie, and thanks for your reponse. Sure, here's a reproducible example: File: data.js
File: index.html.tmpl
Finally,
Expected:
Obviously, |
AFAIK there is nothing in the mustache spec that says it should automatically output JSON here. If you want to output JSON, then you should call |
Agreed, the spec doesn't say so. But as I stated in the title, I am using the CLI, and not a controller implementation for the moment. If you're accepting JSON as a data input format, as a user I'd expect you to support this in the output as well -- at least when I want to dump a nested data structure. |
No, mustache implementations output the default string representation of the given data, which varies by language (e.g. the JS version will output |
Hi, and thanks for maintaining this great project! I am trying to find a way to present random JSON data structures in an HTML file that is rendered using the
mustache
CLI.Given the following example:
...I'd like to see the following ]results:
...but get:
in the resulting document. Any ideas on how to achieve this goal? Thanks!
The text was updated successfully, but these errors were encountered: