更新时间:2023-11-20 12:04:16
来自 AFNetworking 自述文件:
如果AFNetworking可用,则使用NSJSONSerialization。如果您的应用程序针对的是此类无法使用的平台您可以在项目中包含以下JSON库之一,以便AFNetworking自动检测和使用。
"AFNetworking uses NSJSONSerialization if it is available. If your app targets a platform where this class is not available you can include one of the following JSON libraries to your project for AFNetworking to automatically detect and use."
据说,防止以下错误确保两件事
With that being said, to prevent the following error make sure of two things
AFNetworking
会意识到它无法使用 NSJSONSerialization
并且将会回到其中一个包含的JSON解析类。AFNetworking
would realize it can't use NSJSONSerialization
and will fall back to one of the included JSON parsing classes.Shai。