The json.load() method (without "s" in "load") can read a file directly:

import json

with open('strings.json') as f:
    d = json.load(f)
    print(d)

You were using the json.loads() method, which is used for string arguments only.


The error you get with json.loads is a totally different problem. In that case, there is some invalid JSON content in that file. For that, I would recommend running the file through a JSON validator.

There are also solutions for fixing JSON like for example How do I automatically fix an invalid JSON string?.

Answer from ubomb on Stack Overflow
🌐
Python
docs.python.org › 3 › library › json.html
json — JSON encoder and decoder
February 23, 2026 - Identical to load(), but instead of a file-like object, deserialize s (a str, bytes or bytearray instance containing a JSON document) to a Python object using this conversion table.
🌐
GeeksforGeeks
geeksforgeeks.org › python › json-load-in-python
json.load() in Python - GeeksforGeeks
4 days ago - json.load() is a function from Python's built-in json module.
🌐
GeeksforGeeks
geeksforgeeks.org › python › json-dumps-in-python
json.dumps() in Python - GeeksforGeeks
The json.dumps() function in Python converts a Python object (such as a dictionary or list) into a JSON-formatted string.
Published   January 13, 2026
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-json
Python JSON - GeeksforGeeks
December 23, 2025 - Let's see an example where we convert the JSON objects to Python objects. Here, json.loads() method can be used to parse a valid JSON string and convert it into a Python Dictionary.
🌐
Python
docs.python.org › fr › 3 › library › json.html
json --- JSON encoder and decoder — Documentation Python 3.14.3
February 22, 2026 - Identical to load(), but instead of a file-like object, deserialize s (a str, bytes or bytearray instance containing a JSON document) to a Python object using this conversion table.
🌐
Python Land
python.land › home › data processing with python › json in python: how to read, write, and parse
JSON in Python: How To Read, Write, and Parse • Python Land Tutorial
January 13, 2023 - Loads is short for load string. ... booleans, integers, floats, and strings are recognized for what they are and will be converted into the correct types in Python · Any null will be converted into Python’s None type ... If the interactive example above doesn’t work (it’s still in beta), here’s a more static example instead: >>> import json >>> jsonstring = '{"name": "erik", "age": 38, "married": true}' >>> person = json.loads(jsonstring) >>> print(person['name'], 'is', person['age'], 'years old') erik is 38 years old >>> print(person) {'name': 'erik', 'age': 38, 'married': True}Code language: Python (python)
🌐
Readthedocs
simplejson.readthedocs.io
simplejson — JSON encoder and decoder — simplejson 3.19.1 documentation
load() will read the rest of the file-like object as a string and then call loads(). It does not stop at the end of the first valid JSON document it finds and it will raise an error if there is anything other than whitespace after the document. Except for files containing only one JSON document, ...
Find elsewhere
🌐
Quora
quora.com › What-is-the-usage-of-Json-load-and-JSON-loads-in-Python
What is the usage of Json.load and JSON.loads in Python? - Quora
Answer (1 of 2): The difference is in the source of the JSON text * [code ]json.load()[/code] expects to get the text from a file-like object * [code ]json.loads()[/code] expects to get its text from a string object Assume you have a file (json.txt) with the following contents [code][ {"name"...
🌐
Medium
medium.com › @ajaymaurya73130 › how-to-work-with-json-files-efficiently-using-python-a90610c5869d
How to Work With JSON Files Efficiently Using Python | by Ajaymaurya | Medium
August 25, 2025 - In this guide, we’ll explore how to work with JSON files efficiently using Python, while keeping things beginner-friendly yet practical.
🌐
Medium
medium.com › snowflake › json-methods-load-vs-loads-and-dump-vs-dumps-21434a520b17
JSON Methods: load vs loads() and dump vs dumps() | by Sachin Mittal | Snowflake Builders Blog: Data Engineers, App Developers, AI, & Data Science | Medium
May 2, 2022 - Json.loads(): to convert JSON string to a dictionary. Sometimes we receive JSON response in string format. So to use it in our application, we need to convert JSON string into a Python dictionary.
🌐
JSONLint
jsonlint.com › python-json
How to Read and Write JSON in Python: Complete Guide | JSONLint
import json # Parse JSON string → Python dict data = json.loads('{"name": "Alice", "age": 30}') # Python dict → JSON string json_string = json.dumps({"name": "Alice", "age": 30}) # Read JSON file with open('data.json', 'r') as f: data = json.load(f) # Write JSON file with open('data.json', 'w') as f: json.dump(data, f, indent=2)
🌐
GeeksforGeeks
geeksforgeeks.org › python › read-write-and-parse-json-using-python
Read, Write and Parse JSON using Python - GeeksforGeeks
August 28, 2025 - To convert a JSON string into a Python dictionary, use the json.loads() method from Python’s built-in json module.
🌐
Reintech
reintech.io › term › understanding-json-load-in-python
Understanding json.load() in Python | Reintech media
August 2, 2023 - json.load() is a method in Python's json module, used for reading JSON data from a file. It parses a file containing JSON data and converts it into a Python object. The file from which the method reads can be a .txt or .json file.
🌐
IPWAY Blog
ipway.com › blog › json-load-in-python
Mastering json.load in Python: Comprehensive Guide to Using json.load and more
May 30, 2024 - Manipulating the data, in your Python code. ... Use json.load to read the JSON data from the file and convert it into a Python object.
🌐
Code-maven
python.code-maven.com › python-json › json › json-loads.html
JSON loads - Python JSON
loads · import json with open('data.json') as fh: json_str = fh.read() print(json_str) data = json.loads(json_str) print(data) {"fname": "Foo", "lname": "Bar", "email": null, "children": ["Moo", "Koo", "Roo"], "fixed": ["a", "b"]} {'fname': 'Foo', 'lname': 'Bar', 'email': None, 'children': ['Moo', 'Koo', 'Roo'], 'fixed': ['a', 'b']}
🌐
Srinimf
srinimf.com › 2023 › 01 › 23 › python-json-dump-vs-load-whats-the-difference
Python JSON Dump Vs. Load: What’s the Difference
November 1, 2023 - The JSON.load requires that the entire file is in standard JSON format, so if your file contains other information, you should load the JSON string first and parse it with loads rather than using load directly. ... Data Engineer with deep AI and Generative AI expertise, crafting high-performance data pipelines in PySpark, Databricks, and SQL. Skilled in Python, AWS, and Linux—building scalable, cloud-native solutions for smart applications.
🌐
Tutorialspoint
tutorialspoint.com › python › python_json.htm
Python - JSON
In the following example we are deserializing a JSON string into a Python dictionary using the json.loads() method