AI engineering glossary · Python core

What is json module?

json module: The standard-library module for converting between Python objects and JSON text. json.dumps turns objects into a string, json.loads parses a string, and json.dump and json.load work with files. It is the everyday tool for reading API responses and writing configuration files in Python programs.

Level: intermediateTopic: Python core

json module: an example

json.loads('{"a": 1}') gives {'a': 1}, and json.dumps({'a': 1}) gives the string '{"a": 1}'.

Related terms

More Python core terms

Where you learn it

json module is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.