# 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
相关推荐
码途行者19 小时前
每天10分钟学Go:第23课 协程(goroutine)利威尔xu1 天前
2026-11-25-Go-panic-recover面试码途行者1 天前
每天10分钟学Go:第24课 通道-协程之间的传送带loopfde成序2 天前
Web-RAG 检索可见度评估体系与站点 JSON-LD 及 llms.txt 自动化核验实践codeejun4 天前
每日一Go·MySQL-22、幻读、不可重复读、脏读实战演示码途行者4 天前
每天10分钟学Go:第17课 接口interface-只规定“能做什么“,不管它是什么利威尔xu5 天前
2026-11-24-Go限流器实战码途行者5 天前
每天10分钟学Go:第21课 错误码途行者5 天前
每天10分钟学Go:第22课 自定义错误码途行者6 天前
每天10分钟学Go:第20课 泛型