Closed ashinohara closed 7 years ago
Hi @ashinohara, As you've noticed any value returned by the Handler is marshaled into JSON:
func Handle (evt json.RawMessage, ctx *runtime.Context) (*CustomType, error) { ... }
Also, if your CustomType satisfies the JSON Marshaler interface then it will be automatically processed by the shim. So I advocate on wrapping/modifying your protobuf type to implement this interface.
@fsenart Thanks for the quick response, I will give that a try!
I would like to be able to return protobuf marshaled as json back from the
Handle
function. I know that the current handler callsjson.Marshal
on the value returned from the lambda. Is there a way to easily override this behavior and use the json marshaler in protobufs instead?