Azure / Azure/azure-functions-java-library

How to bind input JSON and use it as POJO?

未关闭
#91 0 条评论 0 个 reaction 已指派 1 人 已被 @amamounelsayed 认领 在 GitHub 查看
area:java-functions rich-types
主要语言
Java
星标
45
派生
49
PR 合并指标
30 天内没有已合并 PR

描述

For example, the input queue message is JSON :
```
{
"image_path":"1905/10/1234/1234.jpg",
"watermakr_id":"1234"
}
```

And I need it automatically serialized as POJO.
So I can access its properties like this :

```
@FunctionName("queueMessageTriggerForWatermark")
public void BlobQueueTriggerForWatermark(
@QueueTrigger(name = "message", queueName = "image-watermark-queue") String message,
@BlobInput(name = "file1", dataType = "binary", path = "{**queueTrigger.path**}.jpg") byte[] arInputImage_org) throws Exception {
```

How to make it possible?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。