Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Would be handy if it included a utility to generate the (un)marshaling functions, so that can just be done as a build step.

So far we’ve used https://github.com/mailru/easyjson for that, but the code generation step is unbelievably slow - multiple minutes for about 100 structs.



It's actually the next milestone, a generator for structs, maps and slices. Until now the goal was to make it ready for some high traffic services in production. These traffic receive JSON with chinese, vietnamese character so we needed to make sure it works well first (boilerplate was not an issue).


Go is pretty good about Unicode, did you run into issues with Chinese and Vietnamese with standard encoding/json package or with other third-party Go JSON libraries?


Nope, it's quite easy to integrate unicode parsing :) just need to check for "\u1234" strings in JSON as it is valid, also need to check for utf16 surrogates. Standard package does it already just had to implement it in Gojay.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: