Python_ use json.dumps ()

Output:

 

[Knowledge]

json compact format string encoded output, and no sequence, which provide alternative methods dumps parameters, so that the output format to improve readability.

  • indent: indentation format parameters according to the data show, read more clearly, the value of indent, representing indentation spaces.
  • sort_keys: the z data is sorted according to a value of keys.

Guess you like

Origin www.cnblogs.com/tianpin/p/11202936.html