Real Python
realpython.com โบ python-json
Working With JSON Data in Python โ Real Python
August 20, 2025 - Its syntax resembles Python ... lowercase for Boolean values. With built-in tools for validating syntax and manipulating JSON files, Python makes it straightforward to work with JSON data. By the end of this tutorial, youโll understand that:...
W3Schools
w3schools.com โบ python โบ python_json.asp
Python JSON
You can convert Python objects of the following types, into JSON strings:
How can I parse (read) and use JSON in Python? - Stack Overflow
My Python program receives JSON data, and I need to get bits of information out of it. How can I parse the data and use the result? I think I need to use json.loads for this task, but I can't under... More on stackoverflow.com
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
Learn How to Use JSON as a Small Database for Your Py Projects by Building a Hotel Accounting System
u/RevolutionaryAd8906 , I appreciate your good intentions in creating a beginner-friendly tutorial like this. JSON is a core technology that anyone working with modern APIs should understand, and it's important to make learning accessible for beginners. That said, your mindset of setting up JSON to be thought of as a "database" is perhaps sub-optimal ... while it's useful to teach data persistence early on, positioning JSON as a database can set beginners up for struggles down the line. I think you know this, and I see where you're going with it, but fundamentally it sets up a paradigm in the heads of new programmers that is misaligned with best practices. JSON files are easy to use and understand, making them great for small projects or single-user applications. Maybe a to-do list or managing simple configuration settings, storing user preferences, tracking small collections (e.g., book or movie lists). JSON works well if the scale is very limited. The progression from using JSON for data storage to interacting with APIs is logical and effective. However the limitations of JSON are very quickly apparent: Scalability: JSON is not designed for large datasets (like managing a hotel............. maybe suggest a different example in your HOW TO?) Performance degrades significantly with thousands of records, as the entire file must be read and written each time. RAM also becomes a limiting factor. Beyond a few thousand records, load and save times will noticeably degrade, especially with detailed records. Concurrency: JSON does not handle concurrent access. When multiple users or processes interact with the data, conflicts and errors are likely. Traditional databases manage this with record locking, transactions, and ACID compliance. Data Integrity and Security: JSON lacks built-in features for enforcing data types, constraints, or relationships. Storing sensitive information in plain-text JSON without encryption is risky (like the hotel guests credit card numbers and addresses...??) Databases like SQLite or even NoSQL options like MongoDB help mitigate these issues. Integrating databases from the beginning with new programming students can be valuable and I would argue worth doing. It seems to me you're kicking a can down the line and instilling a bad notion in their heads that they can use JSON as a flat file database. SQLite, for instance, requires minimal setup and offers skills that are more transferable to complex projects. It introduces concepts like relationships, querying, and data normalization, which can save a lot of headaches later on. I wonder if there's a middle ground where you introduce data persistence with JSON, and then transition to something like SQLite or an ORM in short order? This would help beginners avoid the pitfalls of using JSON beyond its intended use while still learning important concepts in a manageable way. Anyway ... not trying to criticize too harshly, but I think this is a misguided way to teach what JSON is all about. More on reddit.com
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.comVideos
DataCamp
datacamp.com โบ tutorial โบ json-data-python
Python JSON Data: A Guide With Examples | DataCamp
December 3, 2024 - Learn how to work with JSON in Python, including serialization, deserialization, formatting, optimizing performance, handling APIs, and understanding JSONโs limitations and alternatives.
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.
PYnative
pynative.com โบ home โบ python โบ json
Python JSON โ PYnative
Learn how to read and write JSON-encoded data using Python. Python's built-in module json for JSON encoding and decoding, Pretty print, writing custom JSON encoder and decoder.
Tutorialspoint
tutorialspoint.com โบ python โบ python_json.htm
Python - JSON
JSON in Python is a popular data format used for data exchange between systems. The json module provides functions to work with JSON data, allowing you to serialize Python objects into JSON strings and deserialize JSON strings back into Python
Top answer 1 of 6
679
Very simple:
import json
data = json.loads('{"one" : "1", "two" : "2", "three" : "3"}')
print(data['two']) # or `print data['two']` in Python 2
2 of 6
103
For URL or file, use json.load(). For string with .json content, use json.loads().
#! /usr/bin/python
import json
# from pprint import pprint
json_file = 'my_cube.json'
cube = '1'
with open(json_file) as json_data:
data = json.load(json_data)
# pprint(data)
print "Dimension: ", data['cubes'][cube]['dim']
print "Measures: ", data['cubes'][cube]['meas']
freeCodeCamp
freecodecamp.org โบ news โบ how-to-parse-json-in-python-with-examples
How to Parse JSON in Python โ A Complete Guide With Examples
October 29, 2025 - You'll use it to convert JSON strings into Python dictionaries and lists that you can manipulate with familiar syntax, and then convert your Python data structures back into JSON when you need to send data to an API or save it to a file. Beyond basic parsing, you'll often need to handle nested structures, validate data integrity, manage, and transform data formats.