119 points · by goccy · 5y ago · 31 comments
This library is available by simply replacing the import statement. It's more compatible and much faster than json-iterator/go.
Please give me your feedback ! Thanks !
very interesting library. Keep it up.
Improvement suggestion: While reading the README, the JSON library comparison [1] it's confusing, at least to me. It uses symbols like: ○, and △ which are not obvious. I would rather use "yes/no" or the classic check/x (unicode chars, HN does not support them here) if you want to use symbols. I don't know what "△" even means, so I cannot suggest an alternative.
Just my 2 cents.
[1]: https://github.com/goccy/go-json#json-library-comparison
Edit: This 2021 I have the objective to contribute more to OS projects. Is it OKay if I submit a PR with the change? Thanks!
encoding/json from stdlib makes a lot of allocations (~30) due its use of reflection, which is notoriously slow.
Any chance that you will implement code generation like easyjson?
I had the same results when testing with a project that is already using easyjson, but after commenting out easyjson's json.Un/Marshaler impls I am seeing much improved performance using goccy/go-json.
I would suggest using words like "yes", "no" and "partial". They are short and clear. If you really want to do symbols I recommend using for yes, and still spelling out whatever triangle is supposed to mean.
○ = correct × = incorrect △ = partially incorrect
I'd prefer the yes, no, partial though as well.
My second thought was that that was probably just going to move the confusion to non-native english speakers.
Given a math background, ~~ for 'ish' is also tempting ... but while writing this out I've circled back around to "I can't think of anything better than partial".
>json-iterator/go ... it hasn't been supported for a long time.
I wouldn't say so. The latest release was last summer and the latest commit was last november.
That being said, I'm not really at a point where json decoding is a bottleneck in any of the code I write, but will keep this in mind. Great job!
You could also add your parser to https://github.com/ohler55/compare-go-json.