Streaming JSON with AFNetworking on IOS
问题 What would be the most elegant way to receive data from a streaming JSON API using AFNetworking? AFNetworking provides excellent support for receiving non-streaming data from JSON APIs, but I couldn't find any examples of streaming JSON. 回答1: AFNetworking does not have a built-in streaming SAX-style JSON operation, but it should be straight forward to create your own. Create a subclass of AFJSONRequestOperation Use the outputStream property of the operation during initialization to hook it up