Ok , let say that I have a string text file named \"string.txt\" , and I want to convert it into a json text file.
What I suppose to do? I have tried to use \'json.loads()\' ,bu
import json
with open("string.txt", "rb") as fin:
content = json.load(fin)
with open("stringJson.txt", "wb") as fout:
json.dump(content, fout, indent=1)
See http://docs.python.org/2/library/json.html#basic-usage