# 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
相关推荐
指尖的爷15 小时前
ARM 架构 Ubuntu(RK3588/aarch64)go开发环境安装手册名字还没想好☜15 小时前
Go 实现指数退避重试:context 取消、抖动 jitter 与什么时候别重试Casbin开源社区17 小时前
OpenAgent 详解:单二进制自托管 AI Agent 平台,30+ 模型接入、RAG 知识库、MCP 工具调用与 Casbin 工具权限五彩小白1 天前
GO语言装饰器语法金金计较.2 天前
Go语言-4天若有情6732 天前
独立开发复盘:我用 Node.js 做了个在线工具箱名字还没想好☜2 天前
Go context.AfterFunc 实战(Go 1.21):context 一取消就自动跑清理,告别手写 goroutine 监听 Doneweb守墓人2 天前
【goed/ui】自定义组件设计思想篇Asurplus2 天前
【SpringBoot4】3、从SpringBoot4升级Sa-Token1.46.0报错代码中介商2 天前
C++ 预约系统实战(三):服务端实现——libevent 事件驱动与业务路由