What I wanted to create was a program that takes lines from an external file of the form {key: value}. For example, we have the file t.dat:
{key: value}
t.dat