I am trying to load a simple json which is,
[
{
"positions": [
{
"title": "a",
"is-current": true,
"company-name": "a"
}
],
"public-profile-url": "\/pub\/ademar-b\/20\/22b\/842",
"location": "Irati Area, Brazil",
"first-name": "Ademar",
"num-connections": "4",
"last-name": "B",
"industry": "Government Administration"
},
{
"positions": [
{
"title": "Messenger",
"is-current": true,
"company-name": "YAA Croup"
},
{
"title": "Messenger",
"is-current": true,
"company-name": "YAA Croup"
}
],
"public-profile-url": "\/pub\/adememb-b\/41\/7a8\/171",
"location": "Ethiopia",
"first-name": "adememb",
"num-connections": "0",
"last-name": "B",
"industry": "Wholesale"
}
]
My task is to load the json, clean some entries and then dump it to file. But my following simple code is giving error:
profiles=json.load(fin)
json.dumps(outfile,profiles)
I am not able to understand as why this simple thing is not working, where I am just loading and dumping same json?