我想将此JSON文件用于熊猫,但是此JSON文件存在一些问题。
下载后出现错误,但找不到答案。
{
"content": "http://com.dataturks.a96-i23.open.s3.amazonaws.com/2c9fafb064277d86016431e33e4e003d/8186c3d1-e9d4-4550-8ec1-a062a7628787___0-26.jpg.jpeg",
"annotation": [{
"label": ["Face"],
"notes": "",
"points": [{
"x": 0.08615384615384615,
"y": 0.3063063063063063
}, {
"x": 0.1723076923076923,
"y": 0.45345345345345345
}],
"imageWidth": 650,
"imageHeight": 333
}, {
"label": ["Face"],
"notes": "",
"points": [{
"x": 0.583076923076923,
"y": 0.2912912912912913
}, {
"x": 0.6584615384615384,
"y": 0.46846846846846846
}],
"imageWidth": 650,
"imageHeight": 333
}],
"extras": null
} {
"content": "http://com.dataturks.a96-i23.open.s3.amazonaws.com/2c9fafb064277d86016431e33e4e003d/d1c32c8e-8050-482d-a6c8-b101ccba5b65___0de0ee708a4a47039e441d488615ebb7.png",
"annotation": [{
"label": ["Face"],
"notes": "",
"points": [{
"x": 0.7053087757313109,
"y": 0.23260437375745527
}, {
"x": 0.7692307692307693,
"y": 0.36182902584493043
}],
"imageWidth": 1280,
"imageHeight": 697
}],
"extras": null
}
它显示此消息。
Error: Parse error on line 29:
..., "extras": null} { "content": "http:
---------------------^
Expecting 'EOF', '}', ',', ']', got '{'
我该如何解决这个问题?
答案 0 :(得分:0)
您的JSON结构错误。可能您想在其中获取数组:
[
{
"content": "http://com.dataturks.a96-i23.open.s3.amazonaws.com/2c9fafb064277d86016431e33e4e003d/8186c3d1-e9d4-4550-8ec1-a062a7628787___0-26.jpg.jpeg",
"annotation": [
{
"label": [
"Face"
],
"notes": "",
"points": [
{
"x": 0.08615384615384615,
"y": 0.3063063063063063
},
{
"x": 0.1723076923076923,
"y": 0.45345345345345345
}
],
"imageWidth": 650,
"imageHeight": 333
},
{
"label": [
"Face"
],
"notes": "",
"points": [
{
"x": 0.583076923076923,
"y": 0.2912912912912913
},
{
"x": 0.6584615384615384,
"y": 0.46846846846846846
}
],
"imageWidth": 650,
"imageHeight": 333
}
],
"extras": null
},
{
"content": "http://com.dataturks.a96-i23.open.s3.amazonaws.com/2c9fafb064277d86016431e33e4e003d/d1c32c8e-8050-482d-a6c8-b101ccba5b65___0de0ee708a4a47039e441d488615ebb7.png",
"annotation": [
{
"label": [
"Face"
],
"notes": "",
"points": [
{
"x": 0.7053087757313109,
"y": 0.23260437375745527
},
{
"x": 0.7692307692307693,
"y": 0.36182902584493043
}
],
"imageWidth": 1280,
"imageHeight": 697
}
],
"extras": null
}
]
答案 1 :(得分:0)
尝试一下:应该可以!
启动JSON文件的方式存在问题 使用方括号以方括号[]开头和结尾
[
{
"content": "http://com.dataturks.a96-i23.open.s3.amazonaws.com/2c9fafb064277d86016431e33e4e003d/8186c3d1-e9d4-4550-8ec1-a062a7628787___0-26.jpg.jpeg",
"annotation": [{
"label": ["Face"],
"notes": "",
"points": [{
"x": 0.08615384615384615,
"y": 0.3063063063063063
}, {
"x": 0.1723076923076923,
"y": 0.45345345345345345
}],
"imageWidth": 650,
"imageHeight": 333
}, {
"label": ["Face"],
"notes": "",
"points": [{
"x": 0.583076923076923,
"y": 0.2912912912912913
}, {
"x": 0.6584615384615384,
"y": 0.46846846846846846
}],
"imageWidth": 650,
"imageHeight": 333
}],
"extras": null
} {
"content": "http://com.dataturks.a96-i23.open.s3.amazonaws.com/2c9fafb064277d86016431e33e4e003d/d1c32c8e-8050-482d-a6c8-b101ccba5b65___0de0ee708a4a47039e441d488615ebb7.png",
"annotation": [{
"label": ["Face"],
"notes": "",
"points": [{
"x": 0.7053087757313109,
"y": 0.23260437375745527
}, {
"x": 0.7692307692307693,
"y": 0.36182902584493043
}],
"imageWidth": 1280,
"imageHeight": 697
}],
"extras": null
}
]