Json refactoring