Validating JSON – JSONLint
Periodically when I am working with JSON or writing a tutorial I get an error that complains that the JSON is not valid such as the one below.
An error occurred (MalformedPolicy) when calling the PutBucketPolicy operation: Policies must be valid JSON and the first byte must be '{'
When this occurs I will use a site such as JSONLint to validate the JSON and try to pinpoint the error. For example look at the below where I left out a quote by mistake. JSONLint highlighted the line and helped me narrow down the error.
Once it is all polished off, JSONLint will tell you the JSON is valid.