Error log:
error domain=nscocoaerrordomain code=3840" The operation couldn ' t be completed. (Cocoa error 3840.) " (No string key for value in object around character 22.) userinfo=0x7f7f8b015d60 {Nsdebugdescription=no string key for value in object around character.}
error reason:
server returns JSON format problem
workaround:
A. Grab packet or browser debug interface
1. Grab Bag:
< Span class= "S1" >sudo tcpdump-a host 192.x.x.x
tcpdump-i EN3 host 192. x.x.x
-A plaintext display -i En3:en3 for Device name network interface
2. Browser debugging
two. Online JSON format Proofing
http://tool.oschina.net/codeformat/json JSON online format to find the problem, the server returned is mainly using single quotation marks to cause errors
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
iOS afnetworking Error Resolution