JSON异常:字符32处的未终止对象

时间:2015-02-10 04:36:25

标签: android json

02-10 09:57:18.850: W/System.err(15122): org.json.JSONException: Unterminated object at character 32 of [{"EVENT_NAME":"BHBH","TIME":11:00:00,"TO_DATE":2015-02-12,"EVENT_DESCRIPTION":"HBHJIK","EVENT_ID":1,"USERNAME":"admin","IMAGE":com.mysql.jdbc.Blob@1a66cb6,"GEOCODE":"bvbv","FROM_DATE":2015-02-09,"EVENT_PLACE":"BJIHNIJ"},{"EVENT_NAME":"marriage","TIME":12:00:00,"TO_DATE":2015-02-13,"EVENT_DESCRIPTION":"hjkhjkhjkh","EVENT_ID":2,"USERNAME":"admin","IMAGE":com.mysql.jdbc.Blob@12b2fef,"GEOCODE":"yuytre","FROM_DATE":2015-02-09,"EVENT_PLACE":"gmnfdgvmn"}]
02-10 09:57:18.850: W/System.err(15122):    at org.json.JSONTokener.syntaxError(JSONTokener.java:450)
02-10 09:57:18.850: W/System.err(15122):    at org.json.JSONTokener.readObject(JSONTokener.java:394)
02-10 09:57:18.860: W/System.err(15122):    at org.json.JSONTokener.nextValue(JSONTokener.java:100)
02-10 09:57:18.860: W/System.err(15122):    at org.json.JSONTokener.readArray(JSONTokener.java:430)
02-10 09:57:18.860: W/System.err(15122):    at org.json.JSONTokener.nextValue(JSONTokener.java:103)
02-10 09:57:18.860: W/System.err(15122):    at org.json.JSONArray.<init>(JSONArray.java:87)
02-10 09:57:18.860: W/System.err(15122):    at org.json.JSONArray.<init>(JSONArray.java:103)
02-10 09:57:18.860: W/System.err(15122):    at com.eventscorner.activity.HomeActivity$EventsAsyncTask.forList(HomeActivity.java:101)
02-10 09:57:18.860: W/System.err(15122):    at com.eventscorner.activity.HomeActivity$EventsAsyncTask.onPostExecute(HomeActivity.java:83)
02-10 09:57:18.860: W/System.err(15122):    at com.eventscorner.activity.HomeActivity$EventsAsyncTask.onPostExecute(HomeActivity.java:1)
02-10 09:57:18.860: W/System.err(15122):    at android.os.AsyncTask.finish(AsyncTask.java:631)
02-10 09:57:18.860: W/System.err(15122):    at android.os.AsyncTask.access$600(AsyncTask.java:177)
02-10 09:57:18.870: W/System.err(15122):    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
02-10 09:57:18.870: W/System.err(15122):    at android.os.Handler.dispatchMessage(Handler.java:99)
02-10 09:57:18.870: W/System.err(15122):    at android.os.Looper.loop(Looper.java:137)
02-10 09:57:18.870: W/System.err(15122):    at android.app.ActivityThread.main(ActivityThread.java:5214)
02-10 09:57:18.870: W/System.err(15122):    at java.lang.reflect.Method.invokeNative(Native Method)
02-10 09:57:18.870: W/System.err(15122):    at java.lang.reflect.Method.invoke(Method.java:525)
02-10 09:57:18.870: W/System.err(15122):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
02-10 09:57:18.870: W/System.err(15122):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
02-10 09:57:18.870: W/System.err(15122):    at dalvik.system.NativeStart.main(Native Method)

2 个答案:

答案 0 :(得分:0)

"TIME":11:00:00,"TO_DATE":2015-02-12

必须引用值11:00:002015-02-12

实际上,您需要将除数字truefalsenull以外的任何内容引用到字符串中。您可以在http://json.org/中引用JSON语法。

答案 1 :(得分:0)

此网站非常适合查找json验证错误

http://jsonformatter.curiousconcept.com/

将json粘贴到其中并按PROCESS