# 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
相关推荐
tachibana234 分钟前
使用for range 的时候,它的地址会发生变化吗?王中阳Go1 小时前
Go 后端转 AI:非科班怎么补?一张 3 列路线表(可保存)for_ever_love__8 小时前
LangChain Agentic RAG:让 Agent 自己决定要不要检索、检索几次谢亮_vipxieliang8 小时前
Go gRPC基础与实战徐小黑ACG9 小时前
Golang goroutine、通道、锁丨白色风车丨11 小时前
Python中JSON与字典/列表的相互转换详解FfHUCisI1 天前
Go 性能分析工具 pprof:CPU、Heap 与 Goroutine 实战念何架构之路1 天前
go-grpc核心抽象接口小小龙学IT1 天前
etcd 深度解析:Go 分布式一致性 KV 存储与 Raft 共识实战谢亮_vipxieliang1 天前
Go Gin 中间件与参数验证:从入门到实战