Json fixes

Fix the issues with JsonGenerator producing invalid output for object key names.