========= method One: About the value of the JSON key---JsonPath
Take this code as an example:
String token1= Jsonpath.eval (Json.parseobject (HttpResponse), "$.access_token"). ToString ();
Parameter: Json.parseobject (HttpResponse) converted to JSON data
$.access_token JSON Path
Turns the Httpresoonse entity response data into a JSON object.
Dollar sign: $ represents the current JSON object.
So the meaning of this code is:
Convert the data of the entity response to a JSON object, get a current JSON object $, and then find the path to the key you need, you can get the value of the key, then the value can be encapsulated as a method-(method two parameters (1). Response data, 2. The path to the key in JSON) to take the JSON object value, the next time to take the value of the JSON object, the call can be called)
How to take value values in JSON objects _jsonpath