Optimize JSON auto generator works