# 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 天前
Gin 框架中的规范响应格式设计与实现qwfys2002 天前
How to install golang 1.26.0 to Ubuntu 24.04codeejun2 天前
每日一Go-25、Go语言进阶:深入并发模式1石牌桥网管2 天前
Go 泛型(Generics)上海合宙LuatOS2 天前
LuatOS核心库API——【json 】json 生成和解析库敲代码的柯基2 天前
一篇文章理解tsconfig.json和vue.config.js小二·2 天前
Go 语言系统编程与云原生开发实战(第21篇)小二·2 天前
Go 语言系统编程与云原生开发实战(第20篇)女王大人万岁2 天前
Golang实战Eclipse Paho MQTT库:MQTT通信全解析codeejun2 天前
每日一Go-24、Go语言实战-综合项目:规划与搭建