You can dump the data as a json and use it!
>>> import json
>>> dictionary = {
... "getBalance": {
... "version": "1",
... "appID": "453733",
... "customerID": "453733",
... "AccountNumber": "000190600017042"
... }
... }
>>> dstr =json.dumps(dictionary)
>>> dstr
'{"getBalance": {"AccountNumber": "000190600017042", "version": "1", "customerID": "453733", "appID": "453733"}}'
And to load the data
>>> json.loads(dstr)
{u'getBalance': {u'appID': u'453733', u'version': u'1', u'customerID': u'453733', u'AccountNumber': u'000190600017042'}}
>>> type(json.loads(dstr))
<type 'dict'>
To have indents and escaping quotes, try dumping the data twice!
>>> json.dumps(dictionary) '{"getBalance": {"AccountNumber": "000190600017042", "version": "1", "customerID": "453733", "appID": "453733"}}'
>>> json.dumps(dictionary, indent=4)
'{\n "getBalance": {\n "AccountNumber": "000190600017042", \n "version": "1", \n "customerID": "453733", \n "appID": "453733"\n }\n}'
>>> print json.dumps(json.dumps(dictionary, indent=4))
"{\n \"getBalance\": {\n \"AccountNumber\": \"000190600017042\", \n \"version\": \"1\", \n \"customerID\": \"453733\", \n \"appID\": \"453733\"\n }\n}"