Very simple:

import json
data = json.loads('{"one" : "1", "two" : "2", "three" : "3"}')
print(data['two'])  # or `print data['two']` in Python 2
Answer from John Giotta on Stack Overflow
๐ŸŒ
Zyte
zyte.com โ€บ home โ€บ blog โ€บ json parsing with python [practical guide]
JSON Parsing with Python [Practical Guide]
July 6, 2023 - To access data within a JSON array, ... key-value pairs. ... In the example above, there is an object 'car' inside the JSON structure that contains two mappings ('model' and 'year')....
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ json-data-python
Python JSON Data: A Guide With Examples | DataCamp
December 3, 2024 - This function is used to serialize a Python object into a JSON string. The dumps() function takes a single argument, the Python object, and returns a JSON string. Here's an example:
Discussions

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
Simple tutorials for using reddit api in Python?

Using an API just comes down to making a request to the right end-point (e.g. /api/v1/me), which then returns data. Most of the time this data is in either JSON or XML format.

Now in order to view that end-point (/api/v1/me) you need to be authenticated via OAuth, which is a whole separate process. (But also including making requests by sending the right data back and forth.)

Now to make it easy, you can just use PRAW. Which has a small tutorial on their website. :)

More on reddit.com
๐ŸŒ r/learnpython
31
31
June 26, 2013
๐ŸŒ
Real Python
realpython.com โ€บ python-json
Working With JSON Data in Python โ€“ Real Python
August 20, 2025 - The dog_data dictionary contains a bunch of common Python data types as values. For example, a string in line 2, a Boolean in line 3, a NoneType in line 7, and a tuple in line 8, just to name a few. Next, convert dog_data to a JSON-formatted string and back to Python again.
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ python-pretty-print-json
How to Pretty Print JSON in Python | DigitalOcean
September 16, 2025 - Learn how to pretty print JSON in Python using built-in tools like json.dumps() and pprint to improve readability and debug structured data efficiently.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ how-to-use-the-json-module-in-python
How to Use the JSON Module in Python โ€“ A Beginner's Guide
June 5, 2023 - As you can see in the example, executing the json.tool module with the input file path formats the JSON data and displays the formatted output on the console. You can also redirect the formatted output to an output file by specifying the output file name as the second argument: python -m json.tool horoscope_data.json formatted_data.json
๐ŸŒ
Medium
medium.com โ€บ data-science โ€บ working-with-json-data-in-python-45e25ff958ce
JSON in Python Tutorial | TDS Archive
August 11, 2021 - Writing to json files, reading from json files explained and illustrated with examples in python.
Find elsewhere
๐ŸŒ
Code Institute
codeinstitute.net โ€บ blog โ€บ python โ€บ working with json in python: a beginnerโ€™s guide
Working with JSON in Python: A Beginner's Guide - Code Institute DE
February 6, 2024 - You can use it to validate and pretty-print JSON data without writing a Python script. Hereโ€™s an example of using `json.tool` from the command line:
๐ŸŒ
SitePoint
sitepoint.com โ€บ blog โ€บ programming โ€บ working with json files in python, with examples
Working with JSON Files in Python, with Examples โ€” SitePoint
November 7, 2024 - The JSON data from the file file_handle is passed to the json.load() method, which decodes it into a list of Python dictionaries. The list items are then printed to the console. In this example, letโ€™s decode JSON data from an API endpoint from JSONPlaceholder.
๐ŸŒ
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" } } } } ... #!/usr/bin/env python3 import json f = open('jsondemo.js') data = json.load(f) print(data["mydata"]["color"]) print(data["mydata"]["amount"]) # Pull something out of the middle of an ar
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-json
Python JSON - GeeksforGeeks
December 23, 2025 - This is JSON <class 'str'> Now convert from JSON to Python Converted to Python <class 'dict'> {'id': '09', 'name': 'Nitin', 'department': 'Finance'} Let's see an example where we convert Python objects to JSON objects.
๐ŸŒ
Towards Data Science
towardsdatascience.com โ€บ home โ€บ latest โ€บ 10 examples to learn the json module of python
10 Examples to Learn the JSON module of Python | Towards Data Science
January 15, 2025 - The JSONEncoder class gives us more control over the serialization process when converting a complex Python object into JSON. Instead of providing a default function to json.dumps(), we can create a subclass of JSONEncoder and override its default() method. Letโ€™s do the same example with the Person class but using JSONEncoder instead of the default parameter.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ python_json.htm
Python - JSON
The main method in this class is decode(). In this example, the "JSONEncoder" is used to encode a Python list into a JSON string, and the "JSONDecoder" is then used to decode the JSON string back into a ...
๐ŸŒ
Medium
medium.com โ€บ @AlexanderObregon โ€บ how-to-work-with-json-in-python-aef62d28eac4
How to Work with JSON in Python | Medium
November 2, 2024 - To read JSON data from a file, you can use the json.load() function. This function reads the file's content and converts it into a Python object, typically a dictionary or a list, depending on the JSON structure. For example, letโ€™s say we have a JSON file named data.json with the following content:
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ reading-and-writing-json-to-a-file-in-python
Reading and Writing JSON to a File in Python - GeeksforGeeks
It takes two parameters: dictionary: ... simply write it to a file using the "write" function. Example: Convert a dictionary to a JSON string and write it to a file....
Published ย  August 5, 2025
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ json
Python JSON: Read, Write, Parse JSON (With Examples)
In this tutorial, you will learn to parse, read and write JSON in Python with the help of examples. Also, you will learn to convert JSON to dict and pretty print it.
๐ŸŒ
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.
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ json.html
json โ€” JSON encoder and decoder
2 weeks ago - Source code: Lib/json/__init__.py JSON (JavaScript Object Notation), specified by RFC 7159(which obsoletes RFC 4627) and by ECMA-404, is a lightweight data interchange format inspired by JavaScript...
๐ŸŒ
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.
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ handling json files with ease in python
r/Python on Reddit: Handling JSON files with ease in Python
May 29, 2022 -

I have finished writing the third article in the Data Engineering with Python series. This is about working with JSON data in Python. I have tried to cover every necessary use case. If you have any other suggestions, let me know.

Working with JSON in Python
Data Engineering with Python series