Refactoring json views