# 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
相关推荐
互联网中的一颗神经元3 小时前
10. Large 对象分配:直接路径microrain5 小时前
从关系库硬扛到专业时序引擎:SagooIoT时序数据存储的架构取舍Vect__7 小时前
channel 底层剖析李燚10 小时前
数据库迁移不翻车:golang-migrate 实战,143 个 DDL 有序执行(第97篇-E83)运维开发笔记12 小时前
7.1 Go Map 基础光泽雨12 小时前
JSON /XML转换运维开发笔记13 小时前
7.2 Go Map 进阶晴天1613 小时前
VS Code `launch.json` 指南(Node.js版)-Day30西瓜很甜哟1 天前
golang每日十题第2期程序员小八7771 天前
Go 语言特性