Here is a simple snippet that read's in a json
text file from a dictionary. Note that your json file must follow the json standard, so it has to have "
double quotes rather then '
single quotes.
Your JSON dump.txt File:
{"test":"1", "test2":123}
Python Script:
import json
with open('/your/path/to/a/dict/dump.txt') as handle:
dictdump = json.loads(handle.read())