Echoing my other question now need to find a way to crunch json down to one line: e.g.
{"node0":{
"node1":{
"attr0":"foo",
"attr1":"foo bar",
"attr2":"value with long spaces"
}
}}
would like to crunch down to a single line:
{"node0":{"node1":{"attr0":"foo","attr1":"foo bar","attr2":"value with long spaces"}}}
by removing insignificant white spaces and preserving the ones that are within the value. Is there a library to do this in python?
EDIT Thank you both drdaeman and Eli Courtwright for super quick response!