我是JSON的新手,我收到了这个错误。实际上我正在使用JSON文件从云中拉出壁纸..请让我知道我做了什么错误..请..打击arre细节..
org.json.JSONException: Unterminated array at character 5995
这是我的JSON
{
"wallpapers": {
"category": [
{
"name": "Blur",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/Zq3oJXF.png",
"thumbUrl": "http://i.imgur.com/Zq3oJXFm.png",
"name": "Blur-1"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/Dri3Q3k.png",
"thumbUrl": "http://i.imgur.com/Dri3Q3km.png",
"name": "Blur-2"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/HQLf2B2.png",
"thumbUrl": "http://i.imgur.com/HQLf2B2m.png",
"name": "Blur-3"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/kk4Dbeo.png",
"thumbUrl": "http://i.imgur.com/kk4Dbeom.png",
"name": "Blur-4"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/lEuPZYO.png",
"thumbUrl": "http://i.imgur.com/lEuPZYOm.png",
"name": "Blur-5"
}
]
},
{
"name": "Meteor Style",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/tRkX4P5.png",
"thumbUrl": "http://i.imgur.com/tRkX4P5m.png",
"name": "Avengers"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/QCp7W7j.png",
"thumbUrl": "http://i.imgur.com/QCp7W7jm.png",
"name": "Batman"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/plaD66v.png",
"thumbUrl": "http://i.imgur.com/plaD66vm.png",
"name": "C America"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/hAfX42z.png",
"thumbUrl": "http://i.imgur.com/hAfX42zm.png",
"name": "Flash"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/MQaAGUi.png",
"thumbUrl": "http://i.imgur.com/MQaAGUim.png",
"name": "Green Lantern"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/x1GBhD1.png",
"thumbUrl": "http://i.imgur.com/x1GBhD1m.png",
"name": "Iron Man"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/LCSmsc8.png",
"thumbUrl": "http://i.imgur.com/LCSmsc8m.png",
"name": "Meteor"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/icM5MfS.png",
"thumbUrl": "http://i.imgur.com/icM5MfSm.png",
"name": "Super Man"
}
]
},
{
"name": "Outer Space",
"wallpaper": [
{
"author": "PartimusPrime",
"url": "http://i.imgur.com/6DFACmh.jpg",
"thumbUrl": "http://i.imgur.com/6DFACmhm.jpg",
"name": "Outer Space-1"
},
{
"author": "edisile",
"url": "http://i.imgur.com/RCMXDzE.png",
"thumbUrl": "http://i.imgur.com/RCMXDzEm.png",
"name": "Outer Space-2"
},
{
"author": "edisile",
"url": "http://i.imgur.com/CvXSj5Q.png",
"thumbUrl": "http://i.imgur.com/CvXSj5Qm.png",
"name": "Outer Space-3"
},
{
"author": "edisile",
"url": "http://i.imgur.com/BjwtOgc.png",
"thumbUrl": "http://i.imgur.com/BjwtOgcm.png",
"name": "Outer Space-4"
}
]
},
{
"name": "Triangulate",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/rxhJBpb.png",
"thumbUrl": "http://i.imgur.com/rxhJBpbm.png",
"name": "Triangulate-1"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/XfN47N3.png",
"thumbUrl": "http://i.imgur.com/XfN47N3m.png",
"name": "Triangulate-2"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/FQrOMK8.png",
"thumbUrl": "http://i.imgur.com/FQrOMK8m.png",
"name": "Triangulate-3"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/u1FLHgz.png",
"thumbUrl": "http://i.imgur.com/u1FLHgzm.png",
"name": "Triangulate-4"
},
"author": "Musaddiq",
"url": "http://i.imgur.com/q1vAuoO.png",
"thumbUrl": "http://i.imgur.com/q1vAuoOm.png",
"name": "Triangulate-5"
},
"author": "Musaddiq",
"url": "http://i.imgur.com/1IOAQbl.png",
"thumbUrl": "http://i.imgur.com/1IOAQblm.png",
"name": "Triangulate-6"
}
]
}
]
}
]
}
}
任何解决方案?谢谢:))
答案 0 :(得分:3)
您的JSON对象附近有语法错误:
}, <-- Missing new object declaractor '{'
"author": "Musaddiq",
"url": "http://i.imgur.com/q1vAuoO.png",
"thumbUrl": "http://i.imgur.com/q1vAuoOm.png",
"name": "Triangulate-5"
}, <-- Missing new object declaractor '{'
"author": "Musaddiq",
"url": "http://i.imgur.com/1IOAQbl.png",
"thumbUrl": "http://i.imgur.com/1IOAQblm.png",
"name": "Triangulate-6"
}
]
}
] <-- Typographical error, remove this token
} <-- Typographical error, remove this token
]
}
}
答案 1 :(得分:2)
你在json的末尾有不匹配的大括号。没有行号等很难告诉你什么是错的,所以这是解决方案:
{
"wallpapers": {
"category": [
{
"name": "Blur",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/Zq3oJXF.png",
"thumbUrl": "http://i.imgur.com/Zq3oJXFm.png",
"name": "Blur-1"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/Dri3Q3k.png",
"thumbUrl": "http://i.imgur.com/Dri3Q3km.png",
"name": "Blur-2"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/HQLf2B2.png",
"thumbUrl": "http://i.imgur.com/HQLf2B2m.png",
"name": "Blur-3"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/kk4Dbeo.png",
"thumbUrl": "http://i.imgur.com/kk4Dbeom.png",
"name": "Blur-4"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/lEuPZYO.png",
"thumbUrl": "http://i.imgur.com/lEuPZYOm.png",
"name": "Blur-5"
}
]
},
{
"name": "Meteor Style",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/tRkX4P5.png",
"thumbUrl": "http://i.imgur.com/tRkX4P5m.png",
"name": "Avengers"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/QCp7W7j.png",
"thumbUrl": "http://i.imgur.com/QCp7W7jm.png",
"name": "Batman"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/plaD66v.png",
"thumbUrl": "http://i.imgur.com/plaD66vm.png",
"name": "C America"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/hAfX42z.png",
"thumbUrl": "http://i.imgur.com/hAfX42zm.png",
"name": "Flash"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/MQaAGUi.png",
"thumbUrl": "http://i.imgur.com/MQaAGUim.png",
"name": "Green Lantern"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/x1GBhD1.png",
"thumbUrl": "http://i.imgur.com/x1GBhD1m.png",
"name": "Iron Man"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/LCSmsc8.png",
"thumbUrl": "http://i.imgur.com/LCSmsc8m.png",
"name": "Meteor"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/icM5MfS.png",
"thumbUrl": "http://i.imgur.com/icM5MfSm.png",
"name": "Super Man"
}
]
},
{
"name": "Outer Space",
"wallpaper": [
{
"author": "PartimusPrime",
"url": "http://i.imgur.com/6DFACmh.jpg",
"thumbUrl": "http://i.imgur.com/6DFACmhm.jpg",
"name": "Outer Space-1"
},
{
"author": "edisile",
"url": "http://i.imgur.com/RCMXDzE.png",
"thumbUrl": "http://i.imgur.com/RCMXDzEm.png",
"name": "Outer Space-2"
},
{
"author": "edisile",
"url": "http://i.imgur.com/CvXSj5Q.png",
"thumbUrl": "http://i.imgur.com/CvXSj5Qm.png",
"name": "Outer Space-3"
},
{
"author": "edisile",
"url": "http://i.imgur.com/BjwtOgc.png",
"thumbUrl": "http://i.imgur.com/BjwtOgcm.png",
"name": "Outer Space-4"
}
]
},
{
"name": "Triangulate",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/rxhJBpb.png",
"thumbUrl": "http://i.imgur.com/rxhJBpbm.png",
"name": "Triangulate-1"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/XfN47N3.png",
"thumbUrl": "http://i.imgur.com/XfN47N3m.png",
"name": "Triangulate-2"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/FQrOMK8.png",
"thumbUrl": "http://i.imgur.com/FQrOMK8m.png",
"name": "Triangulate-3"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/u1FLHgz.png",
"thumbUrl": "http://i.imgur.com/u1FLHgzm.png",
"name": "Triangulate-4"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/q1vAuoO.png",
"thumbUrl": "http://i.imgur.com/q1vAuoOm.png",
"name": "Triangulate-5"
},{
"author": "Musaddiq",
"url": "http://i.imgur.com/1IOAQbl.png",
"thumbUrl": "http://i.imgur.com/1IOAQblm.png",
"name": "Triangulate-6"
}
]
}
]
}
}
请考虑一个具有语法突出显示的正常的ide /代码编辑器 - 问题显而易见
答案 2 :(得分:2)
Zavg得到一个部分是正确的,你有不正确的,但是你得到的错误是最后一个类别的最后一个壁纸值缺少对象开启者{
这是应该如何
{
"wallpapers": {
"category": [
{
"name": "Blur",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/Zq3oJXF.png",
"thumbUrl": "http://i.imgur.com/Zq3oJXFm.png",
"name": "Blur-1"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/Dri3Q3k.png",
"thumbUrl": "http://i.imgur.com/Dri3Q3km.png",
"name": "Blur-2"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/HQLf2B2.png",
"thumbUrl": "http://i.imgur.com/HQLf2B2m.png",
"name": "Blur-3"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/kk4Dbeo.png",
"thumbUrl": "http://i.imgur.com/kk4Dbeom.png",
"name": "Blur-4"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/lEuPZYO.png",
"thumbUrl": "http://i.imgur.com/lEuPZYOm.png",
"name": "Blur-5"
}
]
},
{
"name": "Meteor Style",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/tRkX4P5.png",
"thumbUrl": "http://i.imgur.com/tRkX4P5m.png",
"name": "Avengers"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/QCp7W7j.png",
"thumbUrl": "http://i.imgur.com/QCp7W7jm.png",
"name": "Batman"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/plaD66v.png",
"thumbUrl": "http://i.imgur.com/plaD66vm.png",
"name": "C America"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/hAfX42z.png",
"thumbUrl": "http://i.imgur.com/hAfX42zm.png",
"name": "Flash"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/MQaAGUi.png",
"thumbUrl": "http://i.imgur.com/MQaAGUim.png",
"name": "Green Lantern"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/x1GBhD1.png",
"thumbUrl": "http://i.imgur.com/x1GBhD1m.png",
"name": "Iron Man"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/LCSmsc8.png",
"thumbUrl": "http://i.imgur.com/LCSmsc8m.png",
"name": "Meteor"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/icM5MfS.png",
"thumbUrl": "http://i.imgur.com/icM5MfSm.png",
"name": "Super Man"
}
]
},
{
"name": "Outer Space",
"wallpaper": [
{
"author": "PartimusPrime",
"url": "http://i.imgur.com/6DFACmh.jpg",
"thumbUrl": "http://i.imgur.com/6DFACmhm.jpg",
"name": "Outer Space-1"
},
{
"author": "edisile",
"url": "http://i.imgur.com/RCMXDzE.png",
"thumbUrl": "http://i.imgur.com/RCMXDzEm.png",
"name": "Outer Space-2"
},
{
"author": "edisile",
"url": "http://i.imgur.com/CvXSj5Q.png",
"thumbUrl": "http://i.imgur.com/CvXSj5Qm.png",
"name": "Outer Space-3"
},
{
"author": "edisile",
"url": "http://i.imgur.com/BjwtOgc.png",
"thumbUrl": "http://i.imgur.com/BjwtOgcm.png",
"name": "Outer Space-4"
}
]
},
{
"name": "Triangulate",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http://i.imgur.com/rxhJBpb.png",
"thumbUrl": "http://i.imgur.com/rxhJBpbm.png",
"name": "Triangulate-1"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/XfN47N3.png",
"thumbUrl": "http://i.imgur.com/XfN47N3m.png",
"name": "Triangulate-2"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/FQrOMK8.png",
"thumbUrl": "http://i.imgur.com/FQrOMK8m.png",
"name": "Triangulate-3"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/u1FLHgz.png",
"thumbUrl": "http://i.imgur.com/u1FLHgzm.png",
"name": "Triangulate-4"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/q1vAuoO.png",
"thumbUrl": "http://i.imgur.com/q1vAuoOm.png",
"name": "Triangulate-5"
},
{
"author": "Musaddiq",
"url": "http://i.imgur.com/1IOAQbl.png",
"thumbUrl": "http://i.imgur.com/1IOAQblm.png",
"name": "Triangulate-6"
}
]
}
]
}
答案 3 :(得分:1)
试试这个......
{
"wallpapers": {
"category": [
{
"name": "Blur",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/Zq3oJXF.png",
"thumbUrl": "http: //i.imgur.com/Zq3oJXFm.png",
"name": "Blur-1"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/Dri3Q3k.png",
"thumbUrl": "http: //i.imgur.com/Dri3Q3km.png",
"name": "Blur-2"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/HQLf2B2.png",
"thumbUrl": "http: //i.imgur.com/HQLf2B2m.png",
"name": "Blur-3"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/kk4Dbeo.png",
"thumbUrl": "http: //i.imgur.com/kk4Dbeom.png",
"name": "Blur-4"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/lEuPZYO.png",
"thumbUrl": "http: //i.imgur.com/lEuPZYOm.png",
"name": "Blur-5"
}
]
},
{
"name": "MeteorStyle",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/tRkX4P5.png",
"thumbUrl": "http: //i.imgur.com/tRkX4P5m.png",
"name": "Avengers"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/QCp7W7j.png",
"thumbUrl": "http: //i.imgur.com/QCp7W7jm.png",
"name": "Batman"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/plaD66v.png",
"thumbUrl": "http: //i.imgur.com/plaD66vm.png",
"name": "CAmerica"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/hAfX42z.png",
"thumbUrl": "http: //i.imgur.com/hAfX42zm.png",
"name": "Flash"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/MQaAGUi.png",
"thumbUrl": "http: //i.imgur.com/MQaAGUim.png",
"name": "GreenLantern"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/x1GBhD1.png",
"thumbUrl": "http: //i.imgur.com/x1GBhD1m.png",
"name": "IronMan"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/LCSmsc8.png",
"thumbUrl": "http: //i.imgur.com/LCSmsc8m.png",
"name": "Meteor"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/icM5MfS.png",
"thumbUrl": "http: //i.imgur.com/icM5MfSm.png",
"name": "SuperMan"
}
]
},
{
"name": "OuterSpace",
"wallpaper": [
{
"author": "PartimusPrime",
"url": "http: //i.imgur.com/6DFACmh.jpg",
"thumbUrl": "http: //i.imgur.com/6DFACmhm.jpg",
"name": "OuterSpace-1"
},
{
"author": "edisile",
"url": "http: //i.imgur.com/RCMXDzE.png",
"thumbUrl": "http: //i.imgur.com/RCMXDzEm.png",
"name": "OuterSpace-2"
},
{
"author": "edisile",
"url": "http: //i.imgur.com/CvXSj5Q.png",
"thumbUrl": "http: //i.imgur.com/CvXSj5Qm.png",
"name": "OuterSpace-3"
},
{
"author": "edisile",
"url": "http: //i.imgur.com/BjwtOgc.png",
"thumbUrl": "http: //i.imgur.com/BjwtOgcm.png",
"name": "OuterSpace-4"
}
]
},
{
"name": "Triangulate",
"wallpaper": [
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/rxhJBpb.png",
"thumbUrl": "http: //i.imgur.com/rxhJBpbm.png",
"name": "Triangulate-1"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/XfN47N3.png",
"thumbUrl": "http: //i.imgur.com/XfN47N3m.png",
"name": "Triangulate-2"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/FQrOMK8.png",
"thumbUrl": "http: //i.imgur.com/FQrOMK8m.png",
"name": "Triangulate-3"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/u1FLHgz.png",
"thumbUrl": "http: //i.imgur.com/u1FLHgzm.png",
"name": "Triangulate-4"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/q1vAuoO.png",
"thumbUrl": "http: //i.imgur.com/q1vAuoOm.png",
"name": "Triangulate-5"
},
{
"author": "Musaddiq",
"url": "http: //i.imgur.com/1IOAQbl.png",
"thumbUrl": "http: //i.imgur.com/1IOAQblm.png",
"name": "Triangulate-6"
}
]
}
]
}
}
你错过了几个左括号,底部附近的订单也不正确。
答案 4 :(得分:-1)
你最后有一个额外的右括号和大括号