2016-02-27 56 views
0

簽署了用戶的解析服務器,當應用程序試圖註冊一個用戶,它不工作,並返回錯誤:錯誤iOS上

Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}".

我已經做了研究和couldn」 t找到與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) 
     } 
    } 

JSON of what gets returned when using the REST API

+0

發佈構建請求的代碼 – RaffAl

+0

@Bearwithme剛剛添加了代碼 – TechSd

回答

0

也許this將有助於


除非你通過選項NSJSONReadingAllowFragments[NSJSONSerialization JSONObjectWithData:options:error:]從響應該服務器必須是具有頂級容器(這是一個數組或字典)的有效JSON。

+0

此信息有幫助,但我無法修改該框架。如果有幫助,我已經包含了使用API​​的JSON圖片。 – TechSd

+0

對不起,我沒有從屏幕截圖的很多信息;但是如果我的回答很有幫助,你可以將它提升(tooltip說'這個答案很有用'),而不會將其標記爲答案。除非您認爲這是答案,否則請務必將其標記爲如此。 –