# 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
相关推荐
运维开发笔记1 小时前
3.7 Go panic 与 recover 学习笔记JavaPub-rodert2 小时前
我把 OpenAI 协议塞进了 Go 工具库:go-commons 开始支持 AI 了青 春 记 忆2 小时前
零基础入门python07:让程序记住数据——JSON文件和异常处理2603_9651481112 小时前
如何解析JSON数据?API返回的商品信息处理教程鬼手点金18 小时前
Scrapy 网络爬虫框架圣殿骑士-Khtangc1 天前
Go错误处理最佳实践进阶从error到panic的完整指南运维开发笔记1 天前
3.6 Go defer 语句学习笔记FfHUCisI1 天前
Golang HTTP 路由设计与请求处理鬼手点金1 天前
Scrapy + Playwright 完整示例(JS 动态渲染网页)存在morning1 天前
【Python 开发实践 一】Python vs Go vs Java 三门语言对比