1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| >>> with open('nouveau.txt', 'w') as f:
... json.dump(fichier, f, indent=3, sort_keys=True)
>>> print json.dumps(fichier, indent=3, sort_keys=True)
[
{
"coordinates": {
"timestamp": "1512479309"
},
"identification": {
"producer": "<reseau>"
},
"meta": {
"name": "<consoBatiment>",
"tags": {}
},
"values": {
"000000": "16.13 MB",
"018000": "15.29 MB",
"052300": "27.02 MB",
"052800": "35.13 MB",
"053700": "27.46 MB",
"058300": "15.43 MB",
"058700": "19.22 MB",
"060500": "1.10 KB",
"060600": "1.10 KB",
"061600": "1.09 KB",
"063300": "1.04 KB",
"063500": "1.10 KB",
"073800": "26.95 MB",
"075100": "14.48 MB",
"082000": "70.58 MB",
"094200": "39.04 MB",
"095500": "58.79 MB",
"096200": "216.76 MB"
}
}
] |
Partager