The malformed example given is:<p><pre><code>    {foo: "bar"}
</code></pre>
which is missing the quotes around foo so it should be:<p><pre><code>    {"foo": "bar"}
</code></pre>
Since both of those would have had the same meaning the JSON spec sensibly restricts things so that only one is valid. See <a href="http://json.org/" rel="nofollow">http://json.org/</a> for the (very short and readable) spec.