Validating JSON – JSONLint

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.
JSONLint - Invalid JSON

Once it is all polished off, JSONLint will tell you the JSON is valid.
JSONLint - Valid JSON

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.