-
-
Notifications
You must be signed in to change notification settings - Fork 238
Add json filter for debugging objects? #192
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
Labels
Comments
Workaround: engine.registerFilter('json', (v, n=0) => JSON.stringify(v, null, n)); |
maybe better to use |
🎉 This issue has been resolved in version 9.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
A liquidjs/src/builtin/filters/object.ts Lines 8 to 10 in 607a5cd
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Nunjucks there is a
dump(n)
filter which is basicallyJSON.stringify(obj, null, n)
(if I understand correctly).I'm struggling to find something similar w/ Liquid.
Closest I've found is Shopify/liquid#121 (and a couple other references to a
json
) filter, but I cannot seem to get that to work w/ liquidjs.UPDATE: Ah, OK, so if I enable the Boolean
strictFilters
option, I get a hard error saying:The text was updated successfully, but these errors were encountered: