2011-07-25 26 views
0

07-25 20:05:28.276:ERROR/log_tag(940):http連接錯誤java.net.URISyntaxException:索引58查詢中的非法字符: http:// localhost/test/parsejsonstrtodatabase.php?JSON = [{「endtime」:「2011-07-19 08:21:32」,「clientid」:1001005,「lastupdate」:「2011-07-19 08:21:32 「empid」:23456,「starttime」:「2011-07-19 08:21:32」,「lastname」:「Senden」,「tckey」:1,「firstname」:「Kim」,「phonenum」 :2147483647,「clientkey」:1001005},{「endtime」:「2011-07-19 08:24:43」,「clientid」:1001002,「lastupdate」:「2011-07-19 08:24:43」 ,「empid」:12345,「starttime」:「2011-07-19 08:24:43」,「lastname」:「Frenzo」,「tckey」:2,「firstname」:「Mary」,「phonenum」: 2147483647,「clientkey」:1001002}]JSON httpget URIsyntaxexception查詢中含有非法字符

嘗試使用httpget將JSON字符串發送到遠程服務器fr om Android,但在這一步失敗了,我不太確定可能是錯的,謝謝。

回答

-1

本質上,一些JSON解析器是嚴格的。

在你的JSON你有一個像

"clientkey" : 1001002 

key.values雖然有些解析器允許這樣做,其他人都期望自己也包裝器像

"clientkey" : "1001002" 

JSON從沒有差異串字面值數字值由" "引用,基本上所有的東西都應該被包裝起來。

+0

此答案與問題無關... – Ted

相關問題