cost 114 ms
使用 JSONPath 從 JSON 獲取 object

[英]Getting an object from a JSON using JSONPath

我在嘗試使用 JSONpath 從 JSON 中提取 object 時遇到問題。 JSON 示例: 我想提取整個“屬性”object,而不是其中包含的值(因為我事先不知道內容,它們是任意鍵值對) 我只能獲取一個數組(通過 $.detail.eventBody.attributes 或 $..at ...

2023-02-01 08:49:07   1   44    jsonpath  
重試直到 response.results[-1].trans.id.includes('TransactionID')

[英]Retry until response.results[-1].trans.id.includes('TransactionID')

抱歉,如果之前有人回答過這個問題,我今天大部分時間都在尋找並發現了一些類似的問題,但沒有解決我的具體問題。 我正在使用“TransactionID”發布到 TransactionAPI-> 休眠線程 10 分鍾(因為這確保事務在下一步中發布)-> 調用讀取 api 這目前有效,但睡眠不 ...

JSONPath 連接 arrays 並加入

[英]JSONPath concat arrays and joing

我正在嘗試使用 JSONPath 表達式來提取 2 arrays 並將它們連接起來以形成一個長數組 - 理想情況下使它們獨一無二。 但是,我在在線游樂場中使用的語法沒有產生結果。 最終我想在 Jenkins 工作中使用它。 因此,它必須與 Java 實施一起運行這是我的 json{ "commi ...

引用根元素作為 JSON 路徑表達式中的鍵

[英]Reference to root element as key in JSON Path Expression

我有一個這樣的 JSON 我想創建一個 JSON 路徑表達式來獲取“real_value”,但我現在沒有鍵“value_of_key”,所以我需要動態引用它。 我試過類似的東西: $.nested['$.key_to_find'] 但它不起作用。 如何引用根元素值作為獲取子值的鍵? 那可能嗎? 我 ...

尋找一個好的 Visual C++ 2010 兼容 JSON 解析器,支持 windows 32/64 位平台的 JsonPath。 有什么推薦嗎?

[英]Looking for a good Visual C++ 2010 compatible JSON parser that supports JsonPath for windows 32/64 bit platform. Any recommendation?

看過很多像下面這樣的: https://rapidjson.org/index.html - 支持 VC++ 2010。但是,不確定 JsonPATH https://github.com/danielaparker/jsoncons - 支持 JsonPATH。 但是,不確定 VC++ 201 ...

使用 jsonPath 時 springboot 集成測試失敗

[英]springboot Integration test fail when using jsonPath

我在 springboot 中進行了集成測試,我試圖在我的 controller 中測試一個 get 方法。該方法在 postman 中工作。但是它在測試中失敗,找不到 Json 路徑。 測試的controller方法: 我的測試代碼: 結果為 postman: 錯誤信息: ...

如果一個條件不正確,如何在 JsonPath 中使用 OR 條件

[英]How to use OR condition in JsonPath if one condition is not correct

我可以有以下 JSON: 或者 我想根據 json 檢索value或valueString值。在 XPath 中,我可以使用| operator 和 engine 將取適當的值: JsonPath 似乎不能那樣工作。 我在 JsonPath 中嘗試了很多不同的組合,但沒有一個有效。 我使用Jay ...

JSONPath 表達式根據鍵的值返回數組中的對象

[英]JSONPath Expression to return objects within an array based on value of a key

我有一個 JSON 數組,其中包含多個 JSON 對象: 我想使用基於“dimension_table”的“數據集”鍵值的 JSONPath 表達式過濾 JSON,並返回數組中符合此搜索條件的所有對象。 這是所需的過濾結果。 我試圖使用過濾器 $[*][?(@.dataset==dimension ...

JsonPath 類型未定義方法 read(String, String)

[英]The method read(String, String) is undefined for the type JsonPath

我正在使用下面的代碼使用 jsonexpression 從 json 文件中獲取值,我無法使用 Jsonpath.read 方法獲取 pop 說The method read(String, String) is undefined for the type JsonPath ...

為什么 Wiremock Standalone 拒絕我的有效 JSONPath 表達式?

[英]Why is Wiremock Standalone rejecting my valid JSONPath expression?

背景我正在使用wiremock-jre8-standalone-2.35.0.jar 如果傳入請求的數組包含任何值,我希望它返回 200 響應: 如果傳入請求的數組為空,我希望它返回 400 響應: Wiremock 應將傳入請求與以下代碼中的"request": {...}進行匹配: 問題 W ...

kubectl 顯示所有(pod 名稱,容器名稱)對

[英]kubectl display all (pod name, container name) couples

假設我有 2 個 pod podA 和 podB,每個 pod 有 2 個容器。 我想展示: 使用 jsonpath,我只能顯示這種 output 使用此命令: 是否可以僅使用 kubectl 命令重復 pod 名稱? ...

JsonPath 在讀取數組的每個元素時將冒號 (:) 轉換為等於 (=)

[英]JsonPath is converting colon(:) into equal to(=) while reading each element of an array

我正在使用"com.jayway.jsonpath" % "json-path" % "2.7.0"在我們的 API 中解析傳入的 json 消息,該消息基於 scala 編寫的 akka-http 構建。傳入的消息可以包含記錄數組,並且每條記錄,都會執行一些動作。 在嘗試訪問該數組中的每條記錄時 ...

使用 jsonpath 從 JSONArray 中提取數據

[英]Extract data from JSONArray using jsonpath

我有一個 JSON 文件,其中包含如下客戶數據。 在這里,我想提取數量大於 10 的 custName 和 CustId。但我無法獲得所需的 jsonpath 來提取這些值。 我嘗試了類似 - $.customers[*].itemAmount 的方法,它給了我一個 itemAmount 列表,但我 ...

JSONPath 和正則表達式:過濾到搜索結束 substring

[英]JSONPath and regex: filter to search end substring

我需要從這個 JSON 中提取“https://www.domain3.com” 使用正則表達式。 我正在嘗試使用這個(在https://www.jsonquerytool.com/ ...), 但它不起作用,但如果我嘗試在https://regex101.com/中使用它,它似乎工作正常。 任何 ...

JMeter json 路徑提取器和正則表達式組合

[英]JMeter json path extractor and Regular expression combination

我想提取不以“C”開頭的 employee_number 的 sys_id 我嘗試了多個 JSON Extractor 表達式但沒有成功 需要 Xpath 和正則表達式組合,因為 JSON 包含許多其他字段,並且提供的 JSON 只是其中的一小部分。 我也想知道如何結合正則表達式和 JSON 路徑 ...

JSONPath 排除路徑中的鍵

[英]JSONPath exclude key in paths

給定這樣的 json: 我想要所有的內容,但是application/ld+json我找到了一個關於如何根據值執行此操作的線程: https://stackoverflow.com/a/29710922/1092632但我如何排除密鑰? 基本上我要問的是這個的否定: $..content[appli ...

2022-12-20 07:32:58   1   25    jsonpath  

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM