SilentGhost added the comment:
If you run the command in your interpreter you'll see that the output is
correct.
--
assignee: -> docs@python
components: +Documentation -Demos and Tools
nosy: +SilentGhost, docs@python
resolution: -> not a bug
status: open -> closed
___
Martin Panter added the comment:
It returns a string, and the print statement/function prints the contents of
that string. Perhaps you are confused between JSON strings, which appear in the
output, and Python strings, which hold the characters to output.
--
nosy: +vadmium
New submission from Zorigt Bazarragchaa:
I found a syntax type in your demo example on
https://docs.python.org/2/library/json.html
>>> print json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True)
{"a": 0, "b": 0, "c": 0}
The correct return should be a 'str' type not json. Therefore:
>>> print j