PyDocs

Nav

Internet Data Handling

JSONEncoder.encode

json

method of JSONEncoder (source)
  • JSONEncoder.encode(o)
Return a JSON string representation of a Python data structure.

>>> from json.encoder import JSONEncoder
>>> JSONEncoder().encode({"foo": ["bar", "baz"]})
'{"foo": ["bar", "baz"]}'
1 Example
>>> json.JSONEncoder().encode({"foo": ["bar", "baz"]})
'{"foo": ["bar", "baz"]}'
from the Python docs
See Also
No see-alsos for json/JSONEncoder.encode
0 Notes
No notes for JSONEncoder.encode