Using NSJSONSerialization with InputStream

Can anyone explain the reason for the use NSInputStreamin NSJSONSerializationclass func jsonObject? I am trying to download JSON data from a server and display it in real time. My current solution is to simply execute an HTTP request with a download task (because I want to download a background file). Will I get extra speed using a thread on top of the download task? [Of course, in order to get JSON, I have to make API calls, so I suspect that it is currently not possible to use the socket approach, but should I take a look at developing my server to support this solution?]

+4
source share

Source: https://habr.com/ru/post/1654896/


All Articles