# 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
相关推荐
fireworkseasycold1 天前
wpf 基于 JSON 的扩展配置 (Extended Config)” 功能molaifeng1 天前
Go runtime 中的 sudog:连接 Channel 与 GMP 的隐秘枢纽阿猿收手吧!1 天前
【C++】JSON核心数据结构解析及JSONCPP使用羊羊羊i1 天前
使用client-go访问k8s集群Wpa.wk1 天前
接口自动化 - 解决大量响应数据字段的格式断言 -Json-schema源代码•宸1 天前
goframe框架签到系统项目开发(实现总积分和积分明细接口、补签日期校验)YGGP1 天前
【Golang】LeetCode 2. 两数相加Yy_Yyyyy_zz1 天前
2025 技术年终总结|近七年 Golang 工程实践、AI 应用落地与技术创作回顾GrowingYi1 天前
Go语言的特性YGGP1 天前
【Golang】LeetCode 21. 合并两个有序链表