Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of JSON extractor

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you about the role of the JSON extractor, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

1. The function of JSON extractor.

The result of the JSON extractor used to extract the request is a value or a set of values in the json format data. The standard method is $.key, where key is a key in the returned result json. If it is multi-tier, you can continue to use .key. If you encounter the value of key as an array, use .key [n], where n is the index of the elements in the array.

2. Basic syntax description of JSON extractor

The JMeter JSON extractor is developed based on the third-party class library JsonPath, so to master the syntax of the JSON extractor, you need to understand JsonPath.

3. Detailed explanation of JSON extractor

Name: name of the JSON extractor

Comments: functional description of the JSON extractor

Scope of application:

① Main sample and sub-samples: sampler acting on parent nodes and samplers corresponding to child nodes

② Main sample only: this is the default, which only works on the sampler of the parent node

③ Sub-samples only: sampler that acts only on child nodes

④ JMeter Variable Name to use: acts on jmeter variables (you can enter the variable name of jmeter in the input box)

Parameter name: name of the variable stored in the extracted json data

JSON Path expressions: JSON Path expressions that extract JSON data

Match No. (0 or Random) (matching code): match the number of values. Do not enter the first one that meets the criteria by default. 0: random, N: get the Nth,-1: get all (when the match is-1 and the match result has multiple values, multiple values will be concatenated by comma, which can be called by parameter name _ ALL).

Compute comcatemation var (suffix_ALL): when checked, when multiple results are matched, the plug-in will connect them with the "," delimiter and store them in a var named _ ALL (to be used with Match Numbers:-1)

Default value: the default value when the parameter value is not obtained

This is what the JSON extractor does, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report