# 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
相关推荐
圣殿骑士-Khtangc15 小时前
Go-Mutex源码解析从自旋到饥饿模式的完整演进圣殿骑士-Khtangc1 天前
Go大厂面试真题精讲之并发安全Map的实现方案运维开发笔记1 天前
3.8 Go switch 语句学习笔记ccino .1 天前
awvs_json_word.py 使用说明手册richard_yuu1 天前
JSON vs XML vs 二进制:3种序列化终极选型圣殿骑士-Khtangc1 天前
Go-Channel面试精讲从底层结构到select随机性北漂燕郊杨哥1 天前
dsh-desktop:DeepSeek Harness 的本地优先桌面应用朋克洛德的码农2 天前
Go并发-sync包四剑客:Mutex、RWMutex、WaitGroup、Once-从入门到原理圣殿骑士-Khtangc2 天前
Go泛型编程实战从类型约束到泛型数据结构用户7783366132112 天前
SERP 返回 JSON 用 Pydantic 强校验:类型安全解析