Refactoring gson -> core