[問題] JSON Can't Convert , why ?
研究JSON好幾天了
一直卡在這
詳細Code:
http://nopaste.info/565b05eb13.html
當我把Callphp.java裡面的
result12 = "[{"id":"1","account":"davy","pwd":"1234"}]";
result = builder.toString(); //<--- 利用PHP的json_encode傳值給Callphp.java
分別 Log.i 值出來
出現了這個情況
http://ppt.cc/o1TH
兩者值是一樣的
但是前者(result12)可以正常顯示在我要的ListView 並且Convert JSONArray
但是後者(Result)卻出現: Value of java.lang.String cannot be converted to
JSONArray ....
那其實我要的就是像這樣顯示出來
http://ppt.cc/hDRh
但是我要前者 就沒辦法連結MySQL資料庫,變成自定義 那就沒意義了 ...
請教各位前輩們
我該怎麼樣去修改這個Code .......
補:
我使用過 result.equals(result12)去比較過
確實不同 但我卻不知道該怎麼檢測兩者差在哪 .........
CompareTo也看不出來 傳回Unicode 差值 ......?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 1.34.94.164
※ 編輯: j999444 來自: 1.34.94.164 (10/08 03:37)
→
10/08 13:01, , 1F
10/08 13:01, 1F
→
10/08 13:29, , 2F
10/08 13:29, 2F
→
10/08 13:29, , 3F
10/08 13:29, 3F
推
10/08 14:19, , 4F
10/08 14:19, 4F
推
10/08 22:30, , 5F
10/08 22:30, 5F
推
10/09 00:38, , 6F
10/09 00:38, 6F