2 ms·
I'm the author. Happy to answer any questions, hope you like it!
by LeonidBugaev 11y ago
I'm the author.
Happy to answer any questions, hope you like it!
- lobster_johnson 11y agoThis is very useful, thanks! Go's slow JSON parser is annoying. My only criticism is that returning 4 values from a function is not very ergonomic, especially since most of the return values aren't needed in many cases. It would have been better and more idiomatic to return a struct. Alternatively, let it take a pointer to a struct — this would let you avoid memory allocation in loops (though in theory Go should be able to optimize a struct return, too; anyone know?).
- LeonidBugaev 11y agoGood point, i will think how to make it work.