JSON refactoring