Open git-torrent opened 2 years ago
Sorry for the missing of this feature, but it seems difficult for current implementation. Pull requests are welcome, and I will look into this to find out how to make it up 😑
Too bad, I cannot fix this on my own (it requires lot of C-coding). To give some points: having hooks for any type would allow to implement proper JSON mapping as specified in https://developers.google.com/protocol-buffers/docs/proto3#json
Thank you
I am trying to hook
bytes
type to encode it into base64.While I can hook other types, hooking native types gives me
unknown type
error.I tried to recursively traverse the luatable proto representation and fix all the fields of type
bytes
( by using pb.field() ), but this is tedious. Moreover,pb.hook()
seems to be made exactly for this purpose.Thanks