我试图导入到MongoDB的70 MB的JSON文件,该文件是有效的。 但是,我在一个循环中一遍又一遍地得到这个错误:
01 11:42:20 exception:BSON representation of supplied JSON is too large: Failure parsing JSON string near: "name": "L
01 11:42:20
01 11:42:20 Assertion: 10340:Failure parsing JSON string near: "link": "h
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 kernel32.dll BaseThreadInitThunk+0x12
01 11:42:20 ntdll.dll RtlInitializeExceptionChain+0xef
01 11:42:20 exception:BSON representation of supplied JSON is too large: Failure parsing JSON string near: "link": "h
01 11:42:20
01 11:42:20 Assertion: 10340:Failure parsing JSON string near: }
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 kernel32.dll BaseThreadInitThunk+0x12
01 11:42:20 ntdll.dll RtlInitializeExceptionChain+0xef
01 11:42:20 exception:BSON representation of supplied JSON is too large: Failure parsing JSON string near: }
01 11:42:20
01 11:42:20 Assertion: 10340:Failure parsing JSON string near: ],
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 mongoimport.exe ???
01 11:42:20 kernel32.dll BaseThreadInitThunk+0x12
01 11:42:20 ntdll.dll RtlInitializeExceptionChain+0xef
01 11:42:20 exception:BSON representation of supplied JSON is too large: Failure parsing JSON string near: ],
我的JSON(从它只有很小的例子)是由许多许多建筑物像这样的:
[
{
"data": [
"id": "xxxxxxxxxxxxxxxxxx",
"from": {
"name": "yyyyyyyyyyy",
"id": "1111111111111"
},
"to": {
"data": [
{
"version": 1,
"name": "1111111111111",
"id": "1111111111111"
}
]
},
"picture": "fffffffffffffffffffffff.jpg",
"link": "http://www.youtube.com/watch?v=qqqqqqqqqqqqq",
"source": "http://www.youtube.com/v/qqqqqqqqqqqqq?version=3&autohide=1&autoplay=1",
"name": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"description": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v2/xxx/r/dddd",
"actions": [
{
"name": "Comment",
"link": "http://www.example.com/1111111111111/posts/1111111111111"
},
{
"name": "Like",
"link": "http://www.example.com/1111111111111/posts/1111111111111"
}
],
"privacy": {
"value": ""
},
"type": "video",
"created_time": 1356953890,
"updated_time": 1356953890,
"likes": {
"data": [
{
"name": "jjj ",
"id": "59xxx67"
},
{
"name": "xxxxx",
"id": "79xxx27"
}
],
"count": 2
},
"comments": {
"count": 0
}
},
....
....
....
}
]
这是JSON“的一般百通:
[
{
"data": [
{
}
],
"paging": {
"previous": "link",
"next": "link"
}
},
"data": [
{
}
],
"paging": {
"previous": "link",
"next": "link"
}
},
"data": [
{
}
],
"paging": {
"previous": "link",
"next": "link"
}
}
]