How to streaming JSON (chunked transfer encoding) parsing using AFNetworking on ios -
i new ios development. want use afnetworking receive data streaming json api in our server. when send request server, connection kept until wrong network. our server use comet method push messages ios client. there 2 types of messages:heart-beat message reachability monitoring , application message display. messages chunked transfer encoding , json data few bytes. server sends heart-beat messages client if there no application data related user of application.
i find there question similar mine.
streaming json afnetworking on ios
but author of afnetworking said "afnetworking not have built-in streaming sax-style json operation..." . since question asked 2 years ago, checked api of new version of afnetworking, couldn't find examples of streaming json. wonder whether new version of afnetworking(such 2.0 or 2.2) has support streaming json? if no support, there exist other kinds of library parse chunked encoding json data? give me demo code?
thanks forward.
i have not seen finished , ready use out of box json streaming. afnetworking 2 release candidate included afeventsource
, maintained open http connection server, , streamed events. however, not included in stable afnetworking branch.
you can take @ afrocketclient
you'll need work before putting production app.
Comments
Post a Comment