Ios Parse.com-JSON导入日期字段错误
我正在尝试将一些JSON数据导入Parse.com中的一个表中。执行此操作时,我得到以下错误: 导入遇到以下错误:错误111:密钥startDate的类型无效,预期日期,但获取字符串 数据如下:Ios Parse.com-JSON导入日期字段错误,ios,json,date,parse-platform,Ios,Json,Date,Parse Platform,我正在尝试将一些JSON数据导入Parse.com中的一个表中。执行此操作时,我得到以下错误: 导入遇到以下错误:错误111:密钥startDate的类型无效,预期日期,但获取字符串 数据如下: [ { "title":"Software Webinar", "location":"Kingsview Financial", "host":"Josh Chase", "startDate":"10/13/2014 12:30", "EndDate":"
[
{
"title":"Software Webinar",
"location":"Kingsview Financial",
"host":"Josh Chase",
"startDate":"10/13/2014 12:30",
"EndDate":"10/13/2014 13:30",
"eventType":"TA",
"eventDescrioption":"Informative webinars on utilize and maximize all the features of the TA Trader platform."
}
]
我稍微修改了一下日期格式,但没有用。只是尝试导入一些数据,并且必须使用JSON数据来实现。谢谢您的帮助。将您的约会格式如下:
"startDate": {
"__type": "Date",
"iso": "2014-10-13T12:30:00.000Z"
}
[
{
"title":"Software Webinar",
"location":"Kingsview Financial",
"host":"Josh Chase",
"startDate": {
"__type": "Date",
"iso": "2014-10-13T12:30:00.000Z"
},
"EndDate": {
"__type": "Date",
"iso": "2014-10-13T13:30:00.000Z"
},
"eventType":"TA",
"eventDescrioption":"Informative webinars on utilize and maximize all the features of the TA Trader platform."
}
]
您将看到如下所示:
"startDate": {
"__type": "Date",
"iso": "2014-10-13T12:30:00.000Z"
}
[
{
"title":"Software Webinar",
"location":"Kingsview Financial",
"host":"Josh Chase",
"startDate": {
"__type": "Date",
"iso": "2014-10-13T12:30:00.000Z"
},
"EndDate": {
"__type": "Date",
"iso": "2014-10-13T13:30:00.000Z"
},
"eventType":"TA",
"eventDescrioption":"Informative webinars on utilize and maximize all the features of the TA Trader platform."
}
]
希望这有帮助:) 试试看谢谢@borrrden,我以前看过那篇文章。非常有用,对我来说是一个很好的教育。谢谢@Rashad。我认为这是有效的。现在我遇到了一个不同的错误,与“文件不包含数据或格式不正确”有关。我想这意味着我已经通过了日期问题。更新:修复了这个问题,只需要将我的JSON包装在一个{“results”:[]}项中。@nlabhart>很高兴听到这个消息…:)