当应用尝试注册用户时,它无法正常工作并返回错误:
错误域= NSCocoaErrorDomain代码= 3840" JSON文本不是以数组或对象开头,而是选项允许未设置片段。" UserInfo = {NSDebugDescription = JSON文本不以数组或对象开头,并且选项允许未设置片段。}"。
我已完成研究,无法找到与Parse
相关的任何内容。
Parse SDK: 1.12.0
代码:
user.signUpInBackgroundWithBlock { (succeeded: Bool, error: NSError?) -> Void in
if let error = error {
print(error.description)
} else {
self.performSegueWithIdentifier("signup_signin", sender: nil)
}
}
答案 0 :(得分:0)
也许this会有所帮助
除非您将选项NSJSONReadingAllowFragments
传递给[NSJSONSerialization JSONObjectWithData:options:error:]
,否则来自服务器的响应必须是有效的JSON,顶级容器是数组或字典。