Pretty print json but keep inner arrays on one line python -



Pretty print json but keep inner arrays on one line python -

i pretty printing json in python using code:

json.dumps(json_output, indent=2, separators=(',', ': ')

this prints json like:

{ "rows_parsed": [ [ "a", "b", "c", "d" ], [ "e", "f", "g", "i" ], ] }

however, want print like:

{ "rows_parsed": [ ["a","b","c","d"], ["e","f","g","i"], ] }

how can maintain arrays in arrays on 1 line above?

python arrays json dictionary pretty-print

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -