Grammar/ Typo fixes

- Pass over generator.c for grammar fixes.
- Typo fixes across json ext