Basically I am turning the names into the keys for the dictionary and the values associated with that key are the two lines below the name element (age and hobbies, can always assume the age and hobbies are linked with the name above it). I am quite stuck, how do I do this?

your json file is not a valid mapping ... you cannot have duplicate keys in a json mapping ... you will need to manually iterate over the lines ... this solution assumes your file is laid out exactly the same as your example