# struct use MarshalIndent
dataByte, err := json.MarshalIndent(v, "", " ")
# str json use gjson @pretty
gjson.Get(task.Config, "@pretty").String()
golang pretty-print json
Beer Home2024-07-27 13:03
相关推荐
Java展博13 小时前
[Go 后端转场] 从 try-catch 到 if err != nil:写惯 Java 的人第一次上手最别扭的 4 件事用户2986985301416 小时前
在 Python 中把 Word 文档转换为 JSON 的三种实现方式联犀1 天前
ai时代复杂项目的golang项目如何更好的与ai共舞:monorepo+gozerocodeejun1 天前
每日一Go·MySQL-15、慢查询日志实战分析(从 0 到 1 实战排查慢 SQL)FRing033 天前
vue2干货总结10(json-server、vant-ui、postcss插件、axios二次封装、图形验证码、toast轻提示)用户298698530143 天前
使用 Python 将 JSON 转换为 Word 文档的实践指南九英里路3 天前
protobuf快速上手wuyk5554 天前
Spider-第09讲-三格式落盘CSV-Excel-JSONwuyk5555 天前
Spider-第07讲-JSON接口与正则提取程序员Query5 天前
day01-认识Go语言 + golang环境的安装