nltk.JSONTaggedEncoder.encode

JSONTaggedEncoder.encode(o)

Return a JSON string representation of a Python data structure.

>>> JSONEncoder().encode({"foo": ["bar", "baz"]})
'{"foo": ["bar", "baz"]}'