I gave up on using yaml it's doing some overkill object parsing, that I
don't in my case.
Json almost gives me what I want, I wish there was a way to control "depth"
like in pprint?
for example:
data = {'object1':{'a':[1,2,3,4,5], 'b':{'1':[1,2,3,4,5,6]}}}
print json.dumps( data,indent=4,separators=(',',': ') )
>> {
"object1": {
"a": [
1,
2,
3,
4,
5
],
"b": {
"1": [
1,
2,
3,
4,
5,
6
]
}
}
}
## Would love to have control over depth or better separators, so the
output would be:
{
"object1": {
"a": [1,2,3,4,5],
"b": {
"1": [1,2,3,4,5,6]
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/eb402d45-c4c1-476b-96a3-a19fb00d1a2a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.