Fix encoding issue when reading json from file.