Made JsonWriter an instance class