我有一個調用URL的JSON功能,並顯示它在提示味精含量,函數工作我測試了蒙山這個網址:http://date.jsontest.com/JSON HttpRequest的語法
,但我不得不這樣做有此內容的網址://這是一個Java文件類
reponse_tex="{ id:" + p_id + ",Categorie: "+ p_demandAide.getP_categorie()+ ",Type: " +p_demandAide.getP_type() +",Message: " +p_demandAide.getP_message()+",Reponse: " +p_demandAide.getP_response() + " }";
我班的作品,它顯示了我在瀏覽器中的內容,但我知道我必須把它寫在一個格式,以便JSON瞭解它就像第示例url ... 但我很難添加(「」)java不允許它在它的語法。
什麼做轉義你的意思是java不會允許它?你的意思是你必須逃避它嗎? –
它給了我語法錯誤,當我想添加(「」) – neustre
@你可以發佈它看起來像什麼嗎?還是上面那個? –