Я пытаюсь использовать https://azure.microsoft.com/en-us/documentation/articles/documentdb-import-data/#Prerequisites для загрузки json-файла в Azure DocumentDB. Как только загрузка разойдется, я получаю эту ошибку:Microsoft Migration Database Tool Неправильная ошибка символов
System.ArgumentException: The resource name presented contains invalid character '/'. at Microsoft.Azure.Documents.Client.DocumentClient.ValidateResource(Resource resource) at Microsoft.Azure.Documents.Client.DocumentClient.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown ---
Я не могу показаться, чтобы найти документацию по этому вопросу, или, может быть, я не знаю, где искать. Я хотел бы получить некоторые рекомендации относительно того, что это значит и как это исправить. Я предполагаю, что «/» является недопустимым символом в моем документе, возможно, в строке 33.
Это документ до строки 33, если это то, что он указывает.
[
{
"name":"Cabinet De Lespinasse",
"accountid":2953,
"address":null,
"city":null,
"country":null,
"createdAt":null,
"heading":null,
"headingid":null,
"latitude":null,
"longitude":null,
"objectId":null,
"phonenumber1":null,
"website":null,
"display":null,
"email":null,
"aboutUs":"Education: Graduated from the Faculty of Law, State University of Haiti, 1983, Types of Practice: Established in 1877, the law office is specialized in intellectual property law for trademark and patent, insurance and commercial matters. Does not handle collection, Languages: Creole, French, English",
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
},
{//<--This is line 33//
"name":"Cabinet Villejoint",
"accountid":2952,
"address":null,
Update:
Когда я загрузить один объект в следующем формате, загрузка завершается успешно. Я удалил поле даты за комментарий @ larry.
{
\t "name": "Western Union Agence Belmart ",
\t "accountid": 2851,
\t "address": "Route de Tabarre,",
\t "city": "Port-au-Prince",
\t "country": "Haiti",
\t "heading": "Money Transfer Locations",
\t "headingid": 428,
\t "latitude": null,
\t "longitude": null,
\t "objectId": "0NM7Bav1Lp",
\t "phonenumber1": "+509 3859 6346",
\t "website": "http://868.ht",
\t "display": "Western Union Agence Belmart",
\t "email": null,
\t "aboutUs": null,
\t "Verified": false,
\t "Brands": null,
\t "Products": null,
\t "Services": null,
\t "Facebook": null,
\t "Instagram": null,
\t "googlePlus": null,
\t "Twitter": null,
\t "LinkedIn": null,
\t "Youtube": null,
\t "Pinterest": null,
\t "paymentMethods": null,
\t "languagesSpoken": null
}
Однако, когда у меня был второй объект, как показано ниже загрузка не выполняется. Любая идея, что здесь происходит?
[{
"name":"Western Union Agence Belmart ",
"accountid":2851,
"address":"Route de Tabarre,",
"city":"Port-au-Prince",
"country":"Haiti",
"heading":"Money Transfer Locations",
"headingid":428,
"latitude":null,
"longitude":null,
"objectId":"0NM7Bav1Lp",
"phonenumber1":"+509 3859 6346",
"website":"http://868.ht",
"display":"Western Union Agence Belmart",
"email":null,
"aboutUs":null,
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
},
{
"name":"Western Union Agence Belmart ",
"accountid":2853,
"address":"Route de Tabarre,",
"city":"Port-au-Prince",
"country":"Haiti",
"heading":"Money Transfer Locations",
"headingid":428,
"latitude":null,
"longitude":null,
"objectId":"0NM7Bav1Lp",
"phonenumber1":"+509 3859 6346",
"website":"http://868.ht",
"display":"Western Union Agence Belmart",
"email":null,
"aboutUs":null,
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
}]
Спасибо.
Является ли комментарий '// <- Это строка 33 //' на самом деле в JSON? JSON не поддерживает комментарии. –
Это не в json. в json комментариев нет. я просто указывал, что было на линии 33, как мог. Думаю, ваш вопрос подсказывает мне, есть ли особенности формата, который принимает Azure DocumentDB. Я буду искать любые «/», чтобы начать ... – idkjs
Вы можете попробовать запустить свой JSON через http://jsonlint.com. Если он пройдет там, но не будет принят средством переноса данных, тогда, вероятно, ошибка в инструменте переноса данных, потому что я нашел DocumentDB, чтобы принять все надлежащие JSON, но не расширения JSON. Особенно неприятно для некоторых, что объекты JavaScript Date() не принимаются. –