๐ŸŒ
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.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_json.asp
Python JSON
You can convert Python objects of the following types, into JSON strings:
Discussions

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
๐ŸŒ r/Python
36
48
August 20, 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
Working with JSON in Python
Nice article. One minor, super-pedantic nit-pick: you keep using the words "JSON object", when you don't really mean that. A "JSON object" is merely one particular type a JSON string or text can hold, as defined by RFC7159 and its update RFC8259 , ECMA262 , ECMA404 , W3C, and various other standards. So you keep describing how to convert to/from "JSON object", when what you're really doing is converting to/from JSON string (which are also python strings) - and those strings actually are of JSON arrays in your examples, not JSON objects. The arrays happen to contain JSON objects inside the array. So for example this: json.dumps() takes in a Python data type and returns a JSON object. json.loads() takes in a JSON object and returns a Python data type. ...isn't actually true. For example just the two characters 42 is a perfectly valid JSON string, of just a JSON number type. Python's json.dumps() will accept a python int of 42 and convert it to a string. It will then take that serialized python/JSON string and convert it back to a simple python int, using json.loads(). There is no JSON object involved whatsoever. Again, I know I'm being pedantic. And I don't mean to criticize - the article's fine overall. I just get triggered by some minor details sometimes. :) More on reddit.com
๐ŸŒ r/Python
5
2
April 12, 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 22, 2013
๐ŸŒ
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:...
๐ŸŒ
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.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ python_json.htm
Python - JSON
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 objects. JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write, and easy for machines to parse and generate. It is mainly used to transmit data between a server and web application as text. JSON serialization is the process of converting a Python object into a JSON format.
๐ŸŒ
PYnative
pynative.com โ€บ home โ€บ python โ€บ json
Python JSON โ€“ PYnative
In this tutorial, we'll see how we can create, manipulate, and parse JSON in Python using the standard a json module. The built-in Python json module provides us with methods and classes that are used to parse and manipulate JSON in Python. JSON (an acronym for JavaScript Object Notation) is ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-json
Python JSON - GeeksforGeeks
December 23, 2025 - Perform additional JSON operations in Python, including formatting, pretty-printing, flattening nested objects, validating JSON strings, and sorting JSON data by values.
Find elsewhere
๐ŸŒ
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 - It is named JSON because it closely mimics the syntax used in JavaScript objects. In this tutorial, you will explore the JSON module in Python and learn how to effectively work with JSON data.
๐ŸŒ
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.
๐ŸŒ
The New Stack
thenewstack.io โ€บ home โ€บ python for beginners: how to use json in python
Python for Beginners: How to Use JSON in Python - The New Stack
March 9, 2023 - Python for Beginners: How to Use JSON in Python ยท tutorial, Data / Python / Software Development ยท How to parse JSON files within a Python program. May 1st, 2022 5:00am by Jack Wallen ยท JSON is an outstanding way of storing and transferring data.
๐ŸŒ
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 NL
February 6, 2024 - Learn about working with JSON in Python. Explore JSON encoding, custom objects, and more. Perfect for beginners!
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ working-with-json-data-in-python
Working With JSON Data in Python - GeeksforGeeks
1 month ago - Using Python's context manager, create a file named Sample.json and open it with write mode. Here, the dump() takes two arguments first, the data object to be serialized and second the object to which it will be written(Byte format).
๐ŸŒ
Python Engineer
python-engineer.com โ€บ courses โ€บ advancedpython โ€บ 11-json
JSON - Advanced Python 11 - Python Engineer
Encoding a custom object with the default JSONEncoder will raise a TypeError. We can specify a custom encoding function that will store the class name and all object variables in a dictionary.
๐ŸŒ
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 - Learn how to read, write and parse JSON in Python, with helpful examples, and explore popular modules in Python for working with JSON.
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ learn how to use json as a small database for your py projects by building a hotel accounting system
r/Python on Reddit: Learn How to Use JSON as a Small Database for Your Py Projects by Building a Hotel Accounting System
August 20, 2024 -

This is the first free tutorial designed to help beginners learn how to use JSON to create a simple database for their projects.

It also prepares developers for the next two tutorials in our "Learn by Build" series, where we'll cover how to use the requests library, build asynchronous code, and work with threads.

and by time we will add extra more depth projects to enhance your pythonic skills

find tutorial in github https://github.com/rankap/learn_by_build/tree/main/tut_1_learn_json

Top answer
1 of 5
15
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.
2 of 5
8
Students would be far better served by studying examples of database centered applications built around SQLite (an SQL standards compliant database system embedded in the Python standard libraries). JSON is not suitable as a format for database management. None of the JSON accessibility APIs provides support for ACID transaction management, record (table nor row level) locking, schema definition and enforcement, normalization and JOINs, no indexing. This is a lot of code you'd have to write into the front end that no sane, modern, production database application would implement. Database management engines implement those features. Students are better served using tools and frameworks which offer features and APIs similar to those used in real world, production applications.
๐ŸŒ
The Hitchhiker's Guide to Python
docs.python-guide.org โ€บ scenarios โ€บ json
JSON โ€” The Hitchhiker's Guide to Python
d = { 'first_name': 'Guido', 'second_name': 'Rossum', 'titles': ['BDFL', 'Developer'], } print(json.dumps(d)) '{"first_name": "Guido", "last_name": "Rossum", "titles": ["BDFL", "Developer"]}' This opinionated guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis. This guide is now available in tangible book form!
๐ŸŒ
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.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ json-with-python
JSON with Python - GeeksforGeeks
July 23, 2025 - JSON (JavaScript Object Notation) is a file that is mainly used to store and transfer data mostly between a server and a web application. It is popularly used for representing structured data. In this article, we will discuss how to handle JSON data using Python.