If the format of the string is a map or JSON type
String to JSON
Jsonobject jasonobject = Jsonobject.fromobject (str);
String goto Map
Jsonobject jasonobject = Jsonobject.fromobject (str);
Map map = (map) jasonobject;
There is a Chinese garbled solution for passing data between Web pages:
For example, the request interface returns a map or JSON data containing the Chinese
1, first turn map or JSON into string format, if it is a map type, first turn to JSON Jsonobject json=new jsonobject (map); Json.tojsonstring (); turn into string format
2, using Urlencoder.encoder (str, "UTF-8") or "GBK" to encrypt string processing, send encrypted str
3, on the receiving end, after receiving STR, urldecoder.decoder (str, "UTF-8") decrypted to normal STR, generally to be converted to JSON need to remove the opening end of the quotation marks, str=str.substring (1,str.length ()-1) , then use Jsonobject.formobject (str) to turn STR into JSON, then map,map map = (map) json.
Conversion between Json,string,map