Currently I am using the following code to print a large data structure
print(json.dumps(data, indent=4))
I would like to see all the integ
You could always reparse the json, where you do have some control over int parsing, so that you can override int repr:
class hexint(int):
def __repr__(self):
return "0x%x" % self
json.loads(json.dumps(data), parse_int=hexint)
And using the data
as in Gerrat's answer, the output is:
{u'test': 0x21, u'this': 0x63, u'something bigger': [0x1, 0x2, 0x3, {u'a': 0x2c}]}