# 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
相关推荐
bing.shao1 天前
golang 做AI任务执行源代码•宸1 天前
Golang语法进阶(协程池、反射)DICOM医学影像1 天前
3. go语言从零实现以太坊客户端 - 查询合约中账户余额Wpa.wk1 天前
性能测试工具 - JMeter工具组件介绍二nbsaas-boot1 天前
slice / map 在 Go GC 与内存碎片上的真实成本源代码•宸1 天前
Leetcode—1266. 访问所有点的最小时间【简单】源代码•宸1 天前
Leetcode—85. 最大矩形【困难】精神小伙就是猛1 天前
C# Task/ThreadPool async/await对比Golang GMPtechdashen1 天前
Go 1.18+ slice 扩容机制详解「、皓子~1 天前
AI创作系列35 海狸IM桌面版:本地数据库的设计艺术