0
internals-for-interns.com · 9d · discuss
In the previous article , we saw how PGO feeds a CPU profile back into the compiler. This time we leave the compiler for the standard library: encoding/json/v2. encoding/json has served Go since 1.0, but some of its defaults can’t change without breaking people: it accepts duplicate names and invalid UTF-8, encodes nil slices as null, and matches field names case-insensitively. json/v2 is a rewrite with stricter defaults, and v1 is now a thin wrapper on top of it.