refactor json file