starwing / lua-protobuf

A Lua module to work with Google protobuf
MIT License
1.71k stars 388 forks source link

Proto - JSON transcoder #255

Closed git-torrent closed 8 months ago

git-torrent commented 8 months ago

Hello, on Kong we have long open PR that adds the functionality of proto - json transcoder. I was advised it might save some time if that transcoder would be part of lua-protobuf package.

Is there any possibility to add it to this project? What are requirements? The functionality is concentrated into one file https://github.com/Kong/kong/pull/8297/files#diff-3a78d93fbe0ba99669d5d760d6f3cf5c536dd93deab5b499f8528d3c0eaacf29 (to simulate google's solutions - go, c++ or C#).

I am not a C coder, maybe a Lua one, so my contributions are limited. The code is working and tested. It might be slower than your standard and definitely can benefit from some features of pb.c. Of course, I cannot expect anyone to add these features for me.

Thank you for answer

All the best.

starwing commented 8 months ago

You could add jsonproto.lua to lua-protons repo here, but there some issues. That module depends on date and cjson module which is not used by lua-protobuf. So maybe it's better to leave it as a standalone module that depends on lua-proyobuf?

git-torrent commented 8 months ago

I am not thinking of standalone module with dependency. Thank you :)