Open elprans opened 5 years ago
given the annotation arg: MyType
, can you please explain why dataType: json
is needed?
@pragnagopa How does host decide which format to use when sending data to the worker?
default behavior is to check if a string is a json valid. For example, queue trigger like {"id":99, "name":"test"}
should be sent with TypedData set to json: https://github.com/Azure/azure-functions-language-worker-protobuf/blob/dev/src/proto/FunctionRpc.proto#L284
Following up on the conversations in #66, and #409.
One possible way to implement generic handling of bindings is to allow users to annotate function parameters with a dataclass. The argument data is then treated as a conforming JSON object.
For example:
In
function.json
such bindings would then have to specifydataType: json
.\cc @asavaritayal @pragnagopa @maiqbal11