Azure Purview Java RestClient - 使用包含 @ 和 . 点

问题描述

我正在使用 Java 客户端连接到 Azure Purview。 Java 客户端的创建如Azure Purview Rest API 中所述。我收到了来自 API 的响应,但看起来包含 @ 和 dot 的键的反序列化存在一些问题。这些键的值始终映射为 null。

以下是我从 PostMan 测试时收到的 JSON 示例。

{
    "@search.count": 10,"value": [
        {
            "@search.score": 5.234,"@search.highlights": {
                "qualifiedName": [
                    "https://test.dfs.core.windows.net/container-target/<em>test</em> retail information/"
                ],"name": [
                    "<em>test</em> retail information"
                ]
            },"id": "74634859-1s43-89sd-s2n4-42e7f71c7bd4","@search.text": "<em>test</em> retail information"
        }
    ]
}

以下是生成的 Java 映射文件中的代码:

@JsonProperty(value = "@search\\.count")
private Integer searchcount;

@JsonProperty(value = "@search\\.facets")
private JsonSearchFacetResultValue searchfacets;

我曾尝试将属性更改为 @search.count,但这没有帮助。

我调试发现,当从rest客户端调用Azure API时,收到的响应值是正确的,但没有映射到POJO。

您能帮我了解一下可能是什么问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...