Initial JSONGenerator code. WIP.