fixes concurrency issue due to shared instance variable for JsonGenerator #955