首页 文章

Microsoft迁移数据库工具不正确的字符错误

提问于
浏览
0

我正在尝试使用https://azure.microsoft.com/en-us/documentation/articles/documentdb-import-data/#Prerequisites将json文件上载到Azure DocumentDB . 上传后,我收到此错误:

System.ArgumentException:显示的资源名称包含无效字符'/' . Microsoft.Azure.Documents.Client.DocumentClient.ValidateResource(资源资源)中的Microsoft.Azure.Documents.Client.DocumentClient.d__33.MoveNext()---从先前位置抛出异常的堆栈跟踪结束---

我似乎无法找到关于此的文档或者我不知道在哪里看 . 我想就这意味着什么以及如何解决它提供一些指导 . 我的猜测是“/”是我文档中某处的无效字符,可能是第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,

更新:

当我以下列格式上传一个对象时,上传成功 . 我在下面的@ larry评论中删除了日期字段 .

{
  	"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":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
  }]

谢谢 .

1 回答

  • 0

    显然,下面的@larry maccherone提供了正确答案,因为Azure Portal中的DocumentDb文档资源管理器只允许您一次上传一个json对象 . 我在文档中错过了它,或者它没有在那里说 . 然而,这是我经历的结果 . 谢谢,拉里 .

相关问题