parsing json properly instead of using literal_eval