# 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
相关推荐
geovindu21 小时前
go: Strategy Pattern开发小程序的之朴1 天前
基于Go语言的企业级CMS系统架构设计与性能分析——以AnQiCMS为例初心未改HD1 天前
Go语言net/http与Web开发:构建高性能HTTP服务memories1981 天前
Go 语言 Channel(管道/通道)初心未改HD1 天前
Go语言结构体Struct:内存布局、标签、接收者与内存对齐jieyucx1 天前
Go 数据结构入门:线性表、顺序表、链表eLIN TECE1 天前
Golang 构建学习jieyucx1 天前
# Go 语言指针零基础入门详解周末也要写八哥1 天前
Golang语言与Rust语言的对比不甘先生1 天前
Go 四层架构实战:Handler + Service + Repository + Entity(清晰、可控、可演进)