What is the difference between JSON.load() and JSON.loads() functions in PYTHON?
<p>In python, what is he difference between <strong>json.load()</strong> and <strong>json.loads()</strong> ?</p>

<p>I guess that the <em>load()</em> function must be used with a file object (I need thus to use a context manager) while the <em>loads()</em> function take the path to the file as a string. It is a bit confusing.</p>

<p>Does the letter "<strong>s</strong>"in <strong>json.loads()</strong> stand for <strong>string</strong> ?</p>

<p>Thanks a lot for your answers !</p>

<p>Documentation is quite clear: <a href="https://docs.python.org/2/library/json.html" rel="nofollow">https://docs.python.org/2/library/json.html</a></p>

<pre><code>json.load(fp[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_pairs_hook[, **kw]]]]]]]])
</code></pre>

<blockquote>
  <p>Deserialize fp (a .read()-supporting file-like object containing a
  JSON document) to a Python object using this conversion table.</p>
</blockquote>

<pre><code>json.loads(s[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_pairs_hook[, **kw]]]]]]]])
</code></pre>

<blockquote>
  <p>Deserialize s (a str or unicode instance containing a JSON document)
  to a Python object using this conversion table.</p>
</blockquote>

<p>So <code>load</code> is for a file, <code>loads</code> for a <code>string</code></p>

python json python-2.7