News for hackers. Stuff that matters.
Re:A new experimental Go API for JSON by kiitos on Tuesday September 09, 2025 @05:29PM (#45189474)
first of all, that doesn't exercise JSON v2 at all, afaict

second of all, sonic apparently uses unsafe to (unsafe-ly) cast byte slices to strings, which of course is gonna be faster than doing things correctly, but is also of course incomparable to doing things correctly

like almost all benchmark data posted to hn -- unsound, ignore

Re:A new experimental Go API for JSON by kristianp on Tuesday September 09, 2025 @07:01PM (#45190627)
Just using the GOEXPERIMENT=jsonv2 compiler flag changes the underlying implementation if you don't change any code. You're still using the less correct and efficient API though.