Go Blog· Michael Pratt, Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines, and Damien Neil·· 14 天前精选AI 评分82
Go 1.27 正式提供新的 JSON API:encoding/json/v2 与 encoding/json/jsontext
A new Go API for JSON
AI 导读
Go 1.27 正式提供 encoding/json/v2 和 encoding/json/jsontext 两个新包,用于修复 encoding/json 长期存在的缺陷,并为 JSON 处理增加真正的流式能力。
推荐理由
Go 官方详述 encoding/json/v2 与 jsontext 的拆分设计,并给出 v1 与 v2 的性能和兼容差异。
来源:Go Blog · go.dev