I am trying to write a JSON file in my python script I have the following:
#write JSON file:
data = {
'description' : 'ACME',
'taskType' : 100,
'scanFileTypes' : 542.23,
'connections' : connectionName,
'fileTypeExclude' : False,
'policies': 'PCI_Hadoop'
}
with open(jsonPropPath, 'w') as outfile:
json.dump(data, outfile, ensure_ascii=False)
My JSON file looks like:
cat /home/matt/DGagent/jsonFile_20150805102636.json
{"description": "ACME", "scanFileTypes": 542.23000000000002, "connections": "dgcl_20150805102636", "policies": "PCI_Hadoop", "taskType": 100, "fileTypeExclude": false}[matt@server1 ~]
The decimal is being extended as you can see, also its adding the server: [matt@server1 ~]
Can anyone help me correct these issues?