Serialize using JSON instead. Pickle doesn't seem to be behaving and I'm too lazy to figure out exactly why.