json

Avatar
  • Answered
Do you guys have some old json extension bundled with PHP? I have the same version of PHP on my local machine that you have. Everything else is the same (all my needed libs are uploaded). But your PHP does not correctly decode my JSON and mine DOES decode it correctly. Also, my JSON validates as "valid JSON" on the jsonlint.com site.
This is not acceptable behavior.
Avatar
BradM
Hi kleeh, I agree with your statement that "it is not acceptable behavior" for your server's PHP JSON extension to not encode / decode correctly. There are many factors involved, but hopefully we can find what the issue is at hand. I have a bit of experience myself using JSON, which should help here. We do need a little more information from you before we can troubleshoot further. But your PHP does not correctly decode my JSON and mine DOES decode it correctly. Also, my JSON validates as "valid JSON" on the jsonlint.com site. Why doesn't it decode it correctly? Can you give us an example of what it looks like and what it should look like? For the sake of this question, it may be easier if you use pastebin to upload the examples, and then give us a link to your content. We look forward to hearing from you! Feel free to either update your question or post a comment at the bottom of this page with more details. Thanks, - Brad