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
🌐
GeeksforGeeks
geeksforgeeks.org › python › read-json-file-using-python
Read JSON file using Python - GeeksforGeeks
JSON (JavaScript Object Notation) is a format for storing and exchanging structured data. Python provides the built-in json module, which makes it easy to read JSON data from a file and convert it into Python objects such as dictionaries and lists.
Published: July 1, 2026
🌐
OneUptime
oneuptime.com › home › blog › how to read and write json files in python
How to Read and Write JSON Files in Python
January 25, 2026 - Python's built-in json module makes it straightforward to parse JSON from files and strings, as well as serialize Python objects back to JSON. The simplest way to read a JSON file is with json.load():
Discussions

python - Reading JSON from a file - Stack Overflow
If you have to parse the file, then .read would be a bad way of doing it, since you'll have to reimplement what the json module already does. 2021-03-20T01:20:38.82Z+00:00 ... I think LOAD will reimplement the JSON with python dictionary but READ helps to load the JSON directly to the data ... More on stackoverflow.com
🌐 stackoverflow.com
Elegant Method in python to work with Json Files ?
Nothing could be easier. Import json filename = “stuff.json” # load from a file with open(filename) as jfile: data = json.load(jfile) Saving is like this, but open for writing and use json.dump. Lots of details here. https://realpython.com/python-json/ More on reddit.com
🌐 r/learnpython
27
5
October 11, 2025
How do I open or even find a json file?
You store python objects in a file and retrieve the objects from a file using the json module. This tutorial shows you the basics, and you can search for other tutorials. The python doc is here . More on reddit.com
🌐 r/learnpython
24
0
June 26, 2024
Handling JSON files with ease in Python
Looks good. Considered discussing dataclasses/pydantic with json? I found that these go well together More on reddit.com
🌐 r/Python
55
421
May 29, 2022
🌐
Python
docs.python.org › 3 › library › json.html
JSON encoder and decoder — Python 3.14.8 documentation
Deserialize fp to a Python object using the JSON-to-Python conversion table. ... fp (file-like object) – A .read()-supporting text file or binary file containing the JSON document to be deserialized.
🌐
freeCodeCamp
freecodecamp.org › news › loading-a-json-file-in-python-how-to-read-and-parse-json
Loading a JSON File in Python – How to Read and Parse JSON
July 25, 2022 - Also notice how null from the JSON is converted to None in python. This is because null is not valid in Python. The json module also has the load method which you can use to read a file object and parse it at the same time.
🌐
Zyte
zyte.com › home › blog › json parsing with python [practical guide]
JSON Parsing with Python [Practical Guide]
December 3, 2024 - To read JSON data, you can use the built-in json module (JSON Encoder and Decoder) in Python. The json module provides two methods, loads and load, that allow you to parse JSON strings and JSON files, respectively, to convert JSON into Python ...
Find elsewhere
🌐
freeCodeCamp
freecodecamp.org › news › python-parse-json-how-to-read-a-json-file
Python Parse JSON – How to Read a JSON File
February 7, 2022 - If you need to parse a JSON file that returns a dictionary, then you can use the json.load() method. ... On Udemy PYTHON - A to Z Full Course for Beginners Joydip Ghosh and Arjun Reddy 4.1 out of 5 stars (1,376) from 1,376 ratings 1d 48m 1 day ...
🌐
iO Flood
ioflood.com › blog › read-json-file-python
How To Read JSON Files in Python | Guide (With Examples)
February 1, 2024 - This code block opens a JSON file named ‘file.json’, reads its contents using the json.load function, and then prints the data. The json.load function is a powerful tool in Python’s arsenal for handling JSON files, allowing you to read ...
🌐
freeCodeCamp
freecodecamp.org › news › python-read-json-file-how-to-load-json-from-a-file-and-parse-dumps
Python Read JSON File – How to Load JSON from a File and Parse Dumps
October 27, 2020 - Notice the data types of the values, the indentation, and the overall structure of the file. The value of the main key "orders" is an array of JSON objects (this array will be represented as list in Python). Each JSON object holds the data of a pizza order. If we want to read this file in Python, we just need to use a with statement:
🌐
Plain English
python.plainenglish.io › how-to-read-json-file-in-python-with-examples-in-2026-e6d74f4139b1
How to Read JSON File in Python with Examples in 2026 | by Samantha Blake | Python in Plain English
February 1, 2026 - This native compatibility is a key reason REST APIs continue to power 83% of all web services, with JSON as their primary data format. The most reliable way to read a JSON file in Python is through the built-in json module's json.load() function.
🌐
Real Python
realpython.com › python-json
Working With JSON Data in Python – Real Python
August 20, 2025 - Just like when writing files, it’s a good idea to use a context manager when reading a file in Python. That way, you don’t need to bother with closing the file again. When you want to read a JSON file, then you use json.load() inside the ...
🌐
Python Basics
pythonbasics.org › home › python basics › reading json from a file
Reading JSON from a file - pythonbasics.org
Save the file to example.json. ... import json # read file with open('example.json', 'r') as myfile: data=myfile.read() # parse file obj = json.loads(data) # show values print("usd: " + str(obj['usd'])) print("eur: " + str(obj['eur'])) print("gbp: " + str(obj['gbp']))
🌐
Leapcell
leapcell.io › blog › how-to-read-json-in-python
How to Read JSON in Python | Leapcell
July 25, 2025 - JSON is a lightweight data-interchange format that is easy for humans to read and write, and easy for machines to parse and generate. It’s commonly used in web APIs and configuration files. ... Python’s json.loads() method can parse a ...
🌐
Plain English
python.plainenglish.io › how-to-read-json-file-in-python-with-examples-in-2026-9877d0cdca71
How to Read JSON File in Python with Examples in 2026 | by Sherry walker | Python in Plain English
February 9, 2026 - This native compatibility is a key reason REST APIs continue to power 83% of all web services, with JSON as their primary data format. The most reliable way to read a JSON file in Python is through the built-in json module's json.load() function.
🌐
DEV Community
dev.to › vincenttommi › reading-json-file-in-python-42m8
Reading JSON file in Python - DEV Community
June 16, 2023 - The with statement ensures that the file is properly closed after we finish using it, even if an exception occurs. json.load() function is used to load the contents of the JSON file into a Python data structure.
🌐
W3Schools
w3schools.com › python › pandas › pandas_json.asp
Pandas Read JSON
In our examples we will be using a JSON file called 'data.json'. Open data.json. ... Tip: use to_string() to print the entire DataFrame. ... JSON objects have the same format as Python dictionaries.
🌐
Altcademy
altcademy.com › blog › how-to-read-json-file-in-python
How to read json file in Python - Altcademy.com
June 13, 2023 - Import the json module: First, you need to import the json module, which is included in the Python standard library. ... Open the JSON file: To read a JSON file, you need to open the file in read mode ('r').
🌐
GeeksforGeeks
geeksforgeeks.org › python › reading-and-writing-json-to-a-file-in-python
Reading and Writing JSON to a File in Python - GeeksforGeeks
Python offers two main ways to read JSON data: The JSON package has json.load() function that loads the JSON content from a JSON file into a dictionary.
Published: August 5, 2025
🌐
CodeSignal
codesignal.com › learn › courses › hierarchical-and-structured-data-formats › lessons › parsing-json-files-in-python
Parsing JSON Files in Python
In this line, json.load(file) reads the JSON content from the file object file and parses it into a Python dictionary named data.