Current location - Quotes Website - Personality signature - The interface in java provides a set of json strings, which need to be calculated by signature. How should json calculate the signature?
The interface in java provides a set of json strings, which need to be calculated by signature. How should json calculate the signature?
JSON object JSON object = new JSON object();

map map = request . getparametermap();

Iterator

while(it.hasNext()){

String key =(String)it . next();

String[]values =(String[])map . get(key);

jsonObject.accumulate(key,values[0]);

}

string name = JSON object . getstring(" userName "); //Returns the user name accepted by the front desk.

System.out.println (name); //output user name

JSON object . clear(); //clear the data in jsonObjec

JsonObject.put ("love", "football"); //Assign football to the variable name love.

out . print(JSON object); //Returns data in json format.