Guest User

Untitled

a guest
Jul 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. {Token:[{"new":"jkajshdkjashdjhasjkdhjkhd+sd==sfbjhdskfbks+sdjfbs=="}]}
  2.  
  3. - (void)requestFinished:(ASIHTTPRequest *)req
  4. {
  5. NSString *responseString = [req responseString];
  6. NSLog(@"Response: %@", [req responseString]);
  7.  
  8. // Parse the response
  9. SBJsonParser *jsParser = [SBJsonParser new];
  10. id content = [responseString JSONValue];
  11. if(!content){
  12. // Parsing error
  13. NSLog(@"%@", jsParser.errorTrace);
  14. }
  15. }
  16. NSLog(@"ID: %@", content);
  17.  
  18. -JSONValue failed. Error trace is: (
  19. "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 "Object key string expected" UserInfo=0x5a418a0 {NSLocalizedDescription=Object key string expected}"
  20.  
  21. {Token:[{"new":"jkajshdkjashdjhasjkdhjkhd+sd==sfbjhdskfbks+sdjfbs=="}]}
  22.  
  23. {"Token":[{"new":"jkajshdkjashdjhasjkdhjkhd+sd==sfbjhdskfbks+sdjfbs=="}]}
  24.  
  25. SBJsonParser *jsParser = [SBJsonParser new];
  26. id content = [responseString JSONValue];
  27. if(!content){
  28. // Parsing error
  29. NSLog(@"%@", jsParser.errorTrace);
  30. }
Add Comment
Please, Sign In to add comment