3 ms·
If you're using `json.Marshal`, you're using `reflect` [0]. It's slow and it's an absolute gold mine for runtime errors, but sometimes it's the best tool for th
by letitbeirie 4y ago
If you're using `json.Marshal`, you're using `reflect` [0]. It's slow and it's an absolute gold mine for runtime errors, but sometimes it's the best tool for the job.
[0] https://cs.opensource.google/go/go/+/refs/tags/go1.19.5:src/encoding/json/encode.go;l=330;drc=178080740c1bc33f2c7f164504eedc24210bbf1e https://cs.opensource.google/go/go/+/refs/tags/go1.19.5:src/...
- bsaul 4y agoAre there alternatives ? I thought everybody was using the go stdlib for json marshalling..