Because its syntax is derived from JavaScript object notation, a correctly formatted JSON file should always be a valid JavaScript object. If you are trying to use a JSON file in JavaScript and receive an error message, check to make sure your syntax is correct using a free online validator or formatter.