Fix JSON emitter/parser to emit valid JSON
Add nullable date tests