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

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

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