News for hackers. Stuff that matters.
Re:Show HN: Gojay – Performant JSON encoder/decoder for Golang by krylon on Sunday May 20, 2018 @12:59PM (#17113675)
I have been using ffjson[1] in a couple of private projects, which generates code to encode/decode data, which supposedly is faster than the json library from Go's standard library.

Has somebody any first-hand expertise how this compares to the competition?

(I could, of course, do my own benchmarks, but so far I have not had any performance issues on this end, so it has not been a pressing need. The only problem I have run into with ffjson is that various linters will bark at the generated code, but again, that has not been a big problem.)

[1] https://github.com/pquerna/ffjson

Re:Show HN: Gojay – Performant JSON encoder/decoder for Golang by pquerna on Sunday May 20, 2018 @01:33PM (#17113842)
(ffjson author here)

The main feature that ffjson has that most of the non-stdlib JSON libraries is stdlib compatibility. Eg, the same struct-tags and interfaces used in stdlib are used by ffjson. It's just trying move most of the reflection / allocations / etc to a `go generate` step vs runtime.

If you abandon trying to stay consistent with the stdlib JSON, and make new APIs/interfaces for propagating the encoder or decoder state, as Gojay has, it will undoubtedly be faster than ffjson or stdlib.

Re:Show HN: Gojay – Performant JSON encoder/decoder for Golang by krylon on Sunday May 20, 2018 @01:39PM (#17113877)
Thank you very much!