# 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
相关推荐
二楼后座。1 小时前
Golang操作MySQL json字段优雅写法熬了夜的程序员4 小时前
【华为机试】HJ61 放苹果亚洲第一中锋_哈达迪6 小时前
详解缓存淘汰策略:LRU卜锦元20 小时前
Go中使用wire进行统一依赖注入管理mit6.8241 天前
论容器化 | 分析Go和Rust做医疗的后端服务wtsolutions1 天前
Excel to JSON API by WTSolution Documentationykuaile_h81 天前
Go 编译报错排查:vendor/golang.org/x/crypto/cryptobyte/asn1 no Go source filesNejosi_念旧2 天前
解读 Go 中的 constraints包风无雨2 天前
GO 启动 简单服务小明的小名叫小明2 天前
Go从入门到精通(19)-协程(goroutine)与通道(channel)