Hacker News new | ask | show | jobs
by adam0101 5659 days ago
Right but for people new to iOS dev is this really the best way? Instead of giving a caveat why not give a solution that will work in all situations?
2 comments

There's no caveat for using YAJL. An application can feed data to YAJL from connection:didReceiveData: and know that the document is complete in connectionDidFinish:. This works if there are one or many calls to connection:didReceiveData:.

Anybody new to iOS needs to learn that connection:didReceiveData: is called as data is received. There's no way around that. There are two ways to deal with this. The first is to buffer the data as the author suggests. The other approach is to use an incremental parser.

Agreed and that's why I wrote the post to get that info out there instead of having people struggle.