3 ms·
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.co
by BillinghamJ 8y ago
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 https://github.com/mailru/easyjson for that, but the code generation step is unbelievably slow - multiple minutes for about 100 structs.
- francoisllm 8y agoIt'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).
- anothergoogler 8y agoGo 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?
- francoispqr 8y agoNope, 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.