refactored json generators