# 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
相关推荐
平头哥AI14 小时前
Day 22 _ 包装错误别丢链_%w、errors.Is 与 errors.Asmengzhi啊15 小时前
缓存类CacheDataManager把临时数据存入json。做成插件·golang学习记18 小时前
Go 1.27新特性: json/v2使用有趣指南王码码203520 小时前
Go语言CGO:Go与C交互PC2005-cloud20 小时前
DSH 白嫖指南:接入 Command Code Go、WorkBuddy 与 Trae 的免费额度名字还没想好☜1 天前
Docker 镜像瘦身进阶:用 distroless/scratch 把 Go 服务打到 10MB,以及没 shell 怎么调试lvshuocool1 天前
golang 多版本管理工具 -- g海盗12341 天前
DSH 接入 OpenCode Go 报 400 MissingSessionID:从 LLM 语义层退到 fetch 传输层的完整排障Token掘金室1 天前
JSON模式结构化输出报错她说..1 天前
MySQL JSON 处理学习文档