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
🌐
Python
docs.python.org › 3 › library › json.html
json — JSON encoder and decoder
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.
🌐
Bobdc
bobdc.com › blog › pythonjson
Parsing JSON with Python
December 15, 2024 - My sample demo data to parse is pretty close to the test input that I used when I wrote about JSON2RDF: { "mydata": { "color": "red", "amount": 3, "arrayTest": [ "north", "south", "east", "escaped \"test\" string", "west" ], "boolTest": true, "nullTest": null, "addressBookEntry": { "givenName": "Richard", "familyName": "Mutt", "address": { "street": "1 Main St", "city": "Springfield", "zip": "10045" } } } } I read and output it with this Python: #!/usr/bin/env python3 import json f = open('jsondemo.js') data = json.load(f) print(data["mydata"]["color"]) print(data["mydata"]["amount"]) # Pull s
🌐
Imperial College London
python.pages.doc.ic.ac.uk › java › lessons › java › 10-files › 03-load.html
Python for Java Programmers > Loading JSON files | Department of Computing | Imperial College London
[10.9] Reading CSV files into a dict · [10.10] Writing to CSV files · [10.11] That's a wrap! face Josiah Wang · The json module allows you to easily load a JSON file into its equivalent Python object (usually a dict or list). To load your data from a JSON file, use json.load(file_object).
🌐
NetworkAcademy
networkacademy.io › learning path: ccna automation (200-901) ccnaauto › data formats and data models › parsing json with python
Parsing JSON with Python | NetworkAcademy.IO
with open('example.json') as f: data = json.load(f) The with statement is a python control-flow structure that simplifies the process of reading and closing the file. Note that we use the load method instead of loads because this is a file. Let's see what the loaded data looks like in Python: Note that the JSON object is loaded as dictionary in Python.
Find elsewhere
🌐
W3Schools
w3schools.com › python › python_json.asp
Python JSON
If you have a JSON string, you can parse it by using the json.loads() method. The result will be a Python dictionary.
🌐
Zyte
zyte.com › home › blog › json parsing with python [practical guide]
JSON Parsing with Python [Practical Guide]
December 3, 2024 - When loading JSON data into Python, it is converted into a Python object, typically a dictionary or list, and can be manipulated using the standard methods of Python objects. When ready to save the data, you will need to convert it back to JSON format using the json dumps function.
🌐
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():
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.read_json.html
pandas.read_json — pandas 3.0.6 documentation
Convert a JSON string to pandas object. This method reads JSON files or JSON-like data and converts them into pandas objects. It supports a variety of input formats, including line-delimited JSON, compressed files, and various data representations (table, records, index-based, etc.).
🌐
W3Schools
w3schools.com › python › pandas › pandas_json.asp
Pandas Read JSON
JSON objects have the same format as Python dictionaries.
🌐
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 - 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:
🌐
DataCamp
datacamp.com › tutorial › json-data-python
Python JSON Data: A Guide With Examples | DataCamp
December 3, 2024 - For working with large JSON files that cannot fit in memory, you can process the data incrementally using Python’s ijson library or read the file line-by-line if the JSON is structured as a series of smaller objects.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-read-json-files-with-pandas
How to Read JSON Files with Pandas? - GeeksforGeeks
July 23, 2025 - The pd.read_json() function helps to read JSON data directly into a DataFrame. This method is used when we working with standard JSON structures. If the file is located on a remote server we can also pass the URL instead of a local file path.
🌐
Medium
medium.com › @amit25173 › what-is-pandas-read-json-and-why-use-it-8ee69f5bfc96
What is pandas.read_json() and Why Use It? | by Amit Yadav | Medium
March 6, 2025 - That’s exactly what pandas.read_json() does—it helps you convert messy JSON data into a structured format called a DataFrame in Python.
🌐
Dask
docs.dask.org › en › latest › generated › dask.dataframe.read_json.html
dask.dataframe.read_json — Dask documentation
The underlying function that dask will use to read JSON files. By default, this will be the pandas JSON reader (pd.read_json).
🌐
Docs by LangChain
docs.langchain.com › core components › structured output
Structured output - Docs by LangChain
2 days ago - JSON Schema dictionaries must be wrapped in an explicit strategy (ProviderStrategy or ToolStrategy). They are not automatically detected when passed directly to response_format. Support for native structured output features is read dynamically from the model’s profile data if using langchain>=1.1.
🌐
Mimo
mimo.org › tutorials › python › how-to-read-a-json-file-in-python
How to Read a JSON File in Python
Learn how to read a JSON file in Python with json.load(), access dicts/lists safely, and handle FileNotFoundError and JSONDecodeError.
🌐
Facebook
facebook.com › groups › vibecodinglife › posts › 2004236776831516
Jarri Pipeline (weekend research)
Popular groups · Find communities for you · Over 1 billion people across the globe are using Facebook Groups to explore their favorite topics · Log in · Categories · Science & tech · Travel · Animals · Sports & fitness · Entertainment