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>Yes, it stands for string. The <code>json.loads</code> function does not take the file path, but the file contents as a string. Look at the documentation at <a href="https://docs.python.org/2/library/json.html" rel="nofollow">https://docs.python.org/2/library/json.html</a>!</p>

python json python-2.7