title: JSON string validation in Python
body: <p>I need to write a test in Python to validate that the payload I am returning is a valid JSON.</p>
  <pre><code>import json
  s = '{&quot;position&quot;: NaN, &quot;score&quot;: 0.3}'
  json.loads(s)
  </code></pre>
  <p>the code above doesn't throw an exception, while the string is obviously not a valid JSON according to my backend friend and jsonlint.com/.</p>
  <p>What should I do?</p>