# 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
相关推荐
++==7 小时前
JSON和Python的 四种核心容器码农大叔的博客16 小时前
golang示例:switch圣殿骑士-Khtangc18 小时前
Go面试核心考点之GMP调度器源码级深度解析xcLeigh1 天前
Go入门:无类型常量与类型常量的区别泡沫冰@1 天前
GO 语言基础lf13210272 天前
用 JSON Schema 管装修节点记录:从照片台账到可校验工程数据骇客野人2 天前
电商商城微服务架构设计方案(SpringCloud/Go+Vue3+MySQL+ES+RocketMQ)码农大叔的博客2 天前
golang示例:for九九乘法表圣殿骑士-Khtangc2 天前
Go-sync-Pool对象池最佳实践与源码分析互联网中的一颗神经元2 天前
01. Go 内存管理全景架构