Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When calling the Stack Exchange API to get the post body, it will return an error for some posts. EG:
/docs/questions#page=13&pagesize=100&fromdate=2013-09-01&todate=2013-09-02&order=asc&sort=creation&filter=!9ciXf5l7v&site=stackoverflow throws:

Invalid JSON returned

But if we exclude the post body, EG:
/docs/questions#page=13&pagesize=100&fromdate=2013-09-01&todate=2013-09-02&order=asc&sort=creation&filter=default&site=stackoverflow , it works fine.

We suspect it’s because the post body contains some characters like “\0” which makes the returned JSON invalid.

share|improve this question
up vote 2 down vote accepted

This was fixed in the latest deploy.

Root cause: I had let a copy of our JSON serializer (currently ServiceStack.Text) get out of date.

share|improve this answer
Thank you very much! – Michael Sun Sep 27 '13 at 7:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .