I'm doing the same thing - communicating data back to the UI via AJAX and JSON. Haven't noticed problems but I'm not using the PHP json_encode functions.
Where you able to determine whether it was JQuery or PHP? Through your logging facility (e.g log4PHP and the JQuery debug console) see at what point the JSON data is corrupted. Using log4PHP, I dump all inputs & outputs to the database during development. You can check this information on your failures to help troubleshoot. For AJAX, 'm using Dojo which has a console for debugging. But I'm sure jQuery has similar debugging facility. Leon On Oct 28, 5:28 pm, Peter Denton <petermden...@gmail.com> wrote: > Hello, > We are working on a service dealing with a high volume of tweets. We are > seeing crazy things coming through in tweets and are running into recurring > issues when creating large JSON strings to pass to our parser. > > I am curious if anyone can share approach or methodology on how they are > creating valid JSON via PHP. > > - We are storing the tweets as they are first in a DB > - doing some processing > - sending them back to the UI in various forms, via jQuery ajax calls > ($.getJSON). > > 99% of the time, our server side encoding works great, but some tweets are > just bizarre and valid JSON fails. > > Any advice helps. > > Cheers > Peter