2011-11-14, 08:36
dwagner Wrote:I'm wondering if anybody else has run into this problem.
If I send to the JSON Api (via TCP) two or more requests right away (i.e. before the first one has had a chance to respond), more then likely I will then receive all the responses together as one piece of data. The standard JSON parsers on iOS will then complain that there is garbage after the end of the object.
Is this over TCP or HTTP?
Over TCP this is perfectly valid. Theoretically you can't even assume that the order of the responses is the same as the order of the requests (neither over TCP nor HTTP). That's why you have to provide the "id" in every request.