refactor json view