 <p>Every valid JSON is also valid JavaScript but not every valid JavaScript is also valid JSON as JSON is a proper subset of JavaScript:</p> <blockquote> <p>JSON ⊂ JavaScript</p> </blockquote> <p>JSON requires the names of name/value pairs to be quoted while JavaScript doesn’t (as long as they are not reserved keywords).</p> <p>So your first example <code>{"active": "yes"}</code> is both valid JSON and valid JavaScript while the second example <code>{active: "yes"}</code> is only valid JavaScript.</p>