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

建议新增json输出语句 #78

Open
wuyuans opened this issue Feb 8, 2020 · 1 comment
Open

建议新增json输出语句 #78

wuyuans opened this issue Feb 8, 2020 · 1 comment
Labels

Comments

@wuyuans
Copy link

wuyuans commented Feb 8, 2020

<%==[t] variable %>
目前只有一些值类型的转换,有时前端需要json格式,建议新增一种 interface 转json字符串的语句。

@nimoc
Copy link

nimoc commented Nov 26, 2020

最好还是让使用者自己实现吧,毕竟 有些json库存在 将空切片转换为 nil 而不是 []stirng 的问题。
并且在json转字符串失败时应该如何处理每个团队的处理方式也都不一样。


自己实现个 helper 传进去
template.Home(jhttp.Helper{}, userInfo, buffer)

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

No branches or pull requests

3 participants