# 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
相关推荐
PixelBai1 天前
JSON转表格使用教程:从入门到精通想你依然心痛1 天前
AtomCode在后端开发中的实战体验:Go微服务从零搭建殳翰1 天前
向客户端提供JSON数据的方式开发小程序的之朴1 天前
认识安企CMS - 系统概述雨师@1 天前
go语言项目--实例化(图书管理)--005Vect__1 天前
Go 数据结构 slice 深度剖析geovindu1 天前
go: Functional Options Patternbugcome_com1 天前
JSON 知识小课堂techdashen1 天前
把正确性藏进类型里:从 Go 的 io.Reader 到 Rust 的 API 设计必胜刻1 天前
从零搭建全栈博客系统:Go + Vue 3 + Docker 全流程实战