# 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
相关推荐
源图客2 小时前
Go语言goland代码编辑与调试金融小白数据分析之路3 小时前
go 查询 sql go-sqlite3 版本likerhood20 小时前
Fastjson中的JSON.parseObject()详细讲解sweetheart7-71 天前
go/golang 入门学习笔记(Java/Python/C++转Go快速上手)老神在在0011 天前
JSON SchemaVect__1 天前
C++无痛转go第一天,从hello world到切片xiaodaoluanzha1 天前
golang中MetaMessage(mm)的使用研究点啥好呢2 天前
字节跳动Go后端开发工程师面试题精选:10道高频考题+答案解析xxjj998a2 天前
PHP vs Go vs Python:三大语言终极对比jieyucx2 天前
Go 切片核心:子切片详解(下篇)