首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Microsoft迁移数据库工具错误字符错误

Microsoft迁移数据库工具错误字符错误
EN

Stack Overflow用户
提问于 2016-02-03 18:36:58
回答 1查看 167关注 0票数 0

我正在尝试使用https://azure.microsoft.com/en-us/documentation/articles/documentdb-import-data/#Prerequisites将一个json文件上传到Azure DocumentDB。一旦上传开始,我就会得到以下错误:

System.ArgumentException:显示的资源名称包含无效字符“/”。(在Microsoft.Azure.Documents.Client.DocumentClient.ValidateResource(Resource资源)在Microsoft.Azure.Documents.Client.DocumentClient.d__33.MoveNext() --从抛出异常的以前位置开始的堆栈跟踪的结束

我似乎找不到这方面的文件,或者我不知道去哪里找。我想要一些关于这意味着什么和如何解决它的指导。我的猜测是,"/“是我文档中某个位置的无效字符,可能在第33行。

这是直到第33行的文档,如果这是它所指出的。

代码语言:javascript
复制
[
{
"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评论中的日期字段。

代码语言:javascript
复制
{
  	"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
  }

然而,当我有一个像下面这样的第二个对象上传失败。知道这是怎么回事吗?

代码语言:javascript
复制
  [{
    "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
  }]

谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-09 14:47:34

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35185015

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档