lua-protobuf
lua-protobuf copied to clipboard
[feature request] allow custom encoding of buildin types
It would be helpful to allow this:
pb.custom_encode('bool', function (v)
return v and not v == "false"
end
(I'm not sure if hook does what this does so I wrote custom_encode, and currently pb refuses to hook build-in types)