json.dumping None in python returns the string null

Like this

>>> import json
>>> outputs = None
>>> json.dumps(outputs)
'null'
>>> type(json.dumps(outputs))
<class 'str'>

In the case of an array, it looks like this

>>> list  = ["hoge", None]
>>> json.dumps(list)
'["hoge", null]'
>>> type(json.dumps(list))
<class 'str'>

Recommended Posts

json.dumping None in python returns the string null
String manipulation in python
Shift the alphabet string by N characters in Python
Download the file in Python
String object methods in Python
Find the difference in Python
Null object comparison in Python
[Python 2/3] Parse the format string
String date manipulation in Python
Find out the apparent width of a string in python
Getting the arXiv API in Python
Python in the browser: Brython's recommendation
Save the binary file in Python
Hit the Sesami API in Python
In the python command python points to python3.8
Implement the Singleton pattern in Python
Hit the web API in Python
6 ways to string objects in Python
Calculate the previous month in Python
Examine the object's class in python
Get the desktop path in Python
Get the host name in Python
Access the Twitter API in Python
Create a random string in Python
The first step in Python Matplotlib
I wrote the stack in Python
Get the query string (query string) in Django
Master the weakref module in Python
Specify the encoding of the unicode string in the Python 2.x print statement
python: Use the variables defined in the string format as they are
Get the formula in an excel file as a string in Python
Learn the design pattern "Prototype" in Python
What's in the parameter? Edit String & Expression
Fill the string with zeros in python and count some characters from the string
Learn the design pattern "Builder" in Python
Load the remote Python SDK in IntelliJ
Try using the Wunderlist API in Python
Python> dir ({})> dict Returns the object's attributes
Check the behavior of destructor in Python
Learn the design pattern "Flyweight" in Python
Try using the Kraken API in Python
Learn the design pattern "Observer" in Python
Learn the design pattern "Memento" in Python
Learn the design pattern "Proxy" in Python
Write the test in a python docstring
Learn the design pattern "Command" in Python
OR the List in Python (zip function)
Display Python 3 in the browser with MAMP
Tweet using the Twitter API in Python
Learn the design pattern "Visitor" in Python
Learn the design pattern "Bridge" in Python
Associate the table set in python models.py
Learn the design pattern "Decorator" in Python
Run the Python interpreter in a script
The result of installing python in Anaconda
I want to batch convert the result of "string" .split () in Python
Read the file line by line in Python
MongoDB for the first time in Python
Learn the design pattern "Iterator" in Python
The eval () function that calculates a string as an expression in python
Python string