GopherCon 2023: The Future of JSON in Go - Joe Tsai

preview_player
Показать описание
The widely-used “encoding/json” package is over a decade old and has served the Go community well. Over time, we’ve learned much about what works but also identified several flaws and shortcomings. What does the future hold for “json”? What will it take to update “json” to the next version?
Рекомендации по теме
Комментарии
Автор

I *LOVE* geometric explanations as you show at 15:00. Very nice!

ronminnich
Автор

Great talk & very informative.

I hope the v2 json package does not accept options at Marshal/Unmarshal time, but rather requires the user to create a JSON encoder/decoder with the options. Passing in options every time you marshal/unmarshal will be cumbersome and error prone.

botreasons
Автор

Really appreciate how much thought and effort are put into making the transition smooth

jackielii
Автор

I'm excited for jsonv2 - should be great replacement!
It would be amazing to also have a way to set omitempty/omitzero for separate struct fields for either marshaling, but not unmarshaling or vice-versa - this helps with porting services from JS frameworks, where the behavior is different.

x_phl