摘要:
java解析JSON字符串的方法:String jsonStr = "[{"product_id":"7AE370D2-E212-49DC-85DF-EB900E02F0AB","is_anonymous":"0"},{"product_id":"A8720D7F-5FD0-4D9E-A30E-3918264C6772","is_anonymous":"0"}]"JSONArray jsonArray;try { j 阅读全文
摘要:
1、JS中生成JSON对象的方法:var json = [];var row1 = {};row1.id= "1";row1.name = "jyy";或者var row2 = {id:'2',name:'abc'}json.push(row1);json.push(row2);2、JS中将JSON对象解析为字符串的方法:var jsonStr = JSON.stringify(json);3、JS解析JSON对象或者字符串的方法:var objs = eval(json);或者var objs = eval(jsonSt 阅读全文