In Python, is there a way to check if a string is valid JSON before trying to parse it?

For example working with things like the Facebook Graph API, sometimes it returns JSON, sometimes it could return an image file.

5 Answers
5

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *