Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache nifi 使用NiFi表达式的NiFi | Json解析_Apache Nifi - Fatal编程技术网

Apache nifi 使用NiFi表达式的NiFi | Json解析

Apache nifi 使用NiFi表达式的NiFi | Json解析,apache-nifi,Apache Nifi,我正在尝试使用Nifi表达式语言-jsonpath解析我的json 它使用“.”进行节点遍历。如果json中有一个节点名,其中包含“.” 下面是示例json {"feedName":"trigger_category.childfeed123", "feedId":"eff68e0b-a9e6-4c11-b74f-53f161a47faf", "dependentFeedNames":["trigger_category.test_shashi"], "feedJobExecutionCont

我正在尝试使用Nifi表达式语言-jsonpath解析我的json

它使用“.”进行节点遍历。如果json中有一个节点名,其中包含“.”

下面是示例json

{"feedName":"trigger_category.childfeed123",
"feedId":"eff68e0b-a9e6-4c11-b74f-53f161a47faf",
"dependentFeedNames":["trigger_category.test_shashi"],
"feedJobExecutionContexts":{"trigger_category.test_shashi":[{"jobExecutionId":23946,
"startTime":1485145059971,
"endTime":1485145111733,
"executionContext":{"feedts":"1485145061170"}}]},
"latestFeedJobExecutionContext":{"**trigger_category.test_shashi**":{"jobExecutionId":23946,
"startTime":1485145059971,
"endTime":1485145111733,
"executionContext":{"**feedts**":"1485145061170"}}}}

我试图读取feeds,但其父节点“trigger\u category.test\u shashi”中有点(“.”)。如何转义该字符?

您应该能够使用前面提到的括号引用该字符

因此,我相信您将使用的JsonPath是
$.feedJobExecutionContexts.['trigger\u category.test\u shashi']