Azure / Azure/azure-functions-java-library

How to bind input JSON and use it as POJO?

Đang mở
#91 0 bình luận 0 reaction 1 người được giao Được @amamounelsayed nhận Xem trên GitHub
area:java-functions rich-types
Ngôn ngữ chính
Java
Star
45
Fork
49
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.