2013年10月22日星期二

How to get rid of this head

{"json": {"name": " Qiang "} } Using struts the property converted into json object , how can we remove the front of json it ?
------ Solution ---------------------------------------- ----
this is the standard JSON format , why remove ? You are going to get the value of name is not it ?
packaged into JSONObject, first take the key to the json json object , and then take the object key and value
------ For reference only -------------- -------------------------
first build json object of this class
This class object contains attribute name
Second , str.replace ("json");
------ For reference only --------------------- ------------------
in front of the js , ajax get data, the callback function , use data.json get inside things, also the equivalent of removing of that head . . .
------ For reference only -------------------------------------- -
upstairs said is correct .
------ For reference only -------------------------------------- -

personally feel uncomfortable only. . Do not care
------ For reference only ------------------------------------ ---
method is to remove the folder inside struts.xml



list




没有评论:

发表评论