gpt4 book ai didi

ios - JSON 解析使用 [NSJSONSerialization JSONObjectWithData :dataJson options:0 error:&error] thowing nil

转载 作者:行者123 更新时间:2023-11-29 12:16:46 52 4
gpt4 key购买 nike

error = Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Garbage at end.) UserInfo=0x7fa4e25da7c0 {NSDebugDescription=Garbage at end.}

如果将 NSData 更改为 NSString ,响应正在获取但正在使用

id jsonData =  [NSJSONSerialization JSONObjectWithData:dataJson options:0 error:&error]

显示上述错误,并响应nil

最佳答案

实际上我发现了错误,我每次都在附加响应,这造成了问题。现在问题已经解决了。

关于ios - JSON 解析使用 [NSJSONSerialization JSONObjectWithData :dataJson options:0 error:&error] thowing nil,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31811940/

52 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com