🌐
Python
docs.python.org › 3 › library › json.html
JSON encoder and decoder — Python 3.14.3 documentation
1 month ago - parse_float (callable | None) – If set, a function that is called with the string of every JSON float to be decoded. If None (the default), it is equivalent to float(num_str). This can be used to parse JSON floats into custom datatypes, for example decimal.Decimal.
🌐
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.
Discussions

Explain JSON in Python
In this comprehensive guide, we’ll ... and how Python seamlessly integrates with it. JSON is a text-based data interchange format that is easy for humans to read and write. It is language-agnostic, meaning it can be used with any programming language. Key characteristics include its simplicity, lightweight ... More on accuweb.cloud
🌐 accuweb.cloud
1
January 28, 2024
How would you use python to create JSON files?
I read two concrete questions from your post: why you would want to create a JSON object Imagine you want multiple software systems to communicate. Let's say we have three systems, one written in Python, one client written in JavaScript and one more backend system in Java. You can't just send Python objects over a network and expect the systems written in JS or Java to understand them. Same thing the other way around. In the end it's just electrical signals and both the sender and receiver need a common understanding of how to interpret those signals, otherwise they will just be gibberish. That's where data formats like JSON come into play: It's a simple and standardized data format that can be handled in any modern programming language. Now your Python code can serialize its internal representation of a piece of data into this format and send it over a network or store it on some disk, where some other system will eventually pick it up, deserialize it into its own internal representation and process it. show how you would create a JSON object with python import json data = {"year": 2020, "sales": 12345678, "currency": "€"} # creating a JSON string json_string = json.dumps(data) # storing it in a file with open("data.json", "w") as json_file: json.dump(data, json_file) More on reddit.com
🌐 r/learnpython
7
5
March 7, 2020
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 11, 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
🌐
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.
🌐
W3Schools
w3schools.com › python › python_json.asp
Python JSON
Python has a built-in package called json, which can be used to work with JSON data. ... If you have a JSON string, you can parse it by using the json.loads() method.
🌐
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 - JSON arrays represent ordered lists of values and appear frequently in API responses when returning collections of items. Python converts JSON arrays into lists, which you can iterate through or access by index. Here's an example parsing a list of products from an inventory system:
🌐
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.
🌐
Readthedocs
simplejson.readthedocs.io
simplejson — JSON encoder and decoder — simplejson 3.19.1 documentation
Decode a JSON document from s (a str or unicode beginning with a JSON document) starting from the index idx and return a 2-tuple of the Python representation and the index in s where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end, or to decode a string that has a series of JSON objects. JSONDecodeError will be raised if the given JSON document is not valid. class simplejson.JSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=False, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None, use_decimal=True, namedtuple_as_object=True, tuple_as_array=True, bigint_as_string=False, item_sort_key=None, for_json=True, ignore_nan=False, int_as_string_bitcount=None, iterable_as_array=False)¶
🌐
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"]}'
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 - 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
🌐
ZetCode
zetcode.com › python › simplejson
Python simplejson - read, write JSON in Python with simplejson
January 29, 2024 - The example deserializes a JSON string into a Python dictionary. $ ./simple.py <class 'str'> <class 'dict'> {'name': 'Jane', 'age': 17}
🌐
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.
🌐
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.
🌐
GitHub
github.com › simplejson › simplejson
GitHub - simplejson/simplejson: simplejson is a simple, fast, extensible JSON encoder/decoder for Python · GitHub
simplejson is a simple, fast, extensible JSON encoder/decoder for Python - simplejson/simplejson
Starred by 1.7K users
Forked by 355 users
Languages   Python 61.7% | C 38.3%
🌐
Tutorialspoint
tutorialspoint.com › python › python_json.htm
Python - JSON
encode(obj) − Serializes a Python object into a JSON formatted string. iterencode(obj) − Encodes the object and returns an iterator that yields the encoded form of each item in the object. indent − Determines the indent level of the encoded ...
🌐
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 - In this example, the JSON data will be written to ‘person_indented.json’ with an indentation of 4 spaces, making it more readable. Python also provides a command-line tool for working with JSON, called `json.tool`. This tool is useful for formatting JSON data directly from the command line.
🌐
Oxylabs
oxylabs.io › blog › python-parse-json
Reading & Parsing JSON Data With Python: Tutorial
The Python object is now a JSON object. This simple example demonstrates how easy it is to parse a Python object to a JSON object. Note that the Python object was a dictionary. That’s the reason it was converted into a JSON object type. Lists can be converted to JSON as well.
🌐
CodeRivers
coderivers.org › blog › make-json-python
Working with JSON in Python: A Comprehensive Guide - CodeRivers
April 25, 2025 - For example, "Hello, World!" - Numbers: Represented as integers or floats in Python. For example, 42 or 3.14 - Booleans: Represented as True or False in Python. - Null: Represented as None in Python. To convert Python objects to JSON strings, we use the json.dumps() method.
🌐
Accuweb
accuweb.cloud › home › explain json in python
JSON in Python explained with examples
January 28, 2024 - Understanding JSON in Python is essential for anyone working with data in web development or other domains. With Python’s built-in json module, handling JSON data becomes straightforward. This guide has covered the basics of JSON, encoding, decoding, working with files, and advanced features.
🌐
PyPI
pypi.org › project › simplejson
simplejson · PyPI
Simple, fast, extensible JSON encoder/decoder for Python
      » pip install simplejson
    
Published   Sep 26, 2025
Version   3.20.2