What's the most efficient way of converting a 10 MB JSON response into an NSDictionary?

前端 未结 2 1755
攒了一身酷
攒了一身酷 2020-12-10 17:19

Our app must display a big chunk of data with minimal remote http requests, so we have added an endpoint to our backend that provides all the necessary data as a single json

2条回答
  •  孤街浪徒
    2020-12-10 18:06

    While JSONKit is faster than YAJL, YAJL supports parsing of the stream. You should be able to wire it up with ASIHTTPRequest to parse the JSON while it's downloading it. Check out the section labeled "Document style parsing as data becomes available" here:

    http://gabriel.github.com/yajl-objc/

提交回复
热议问题