Further improvements wrt #232: use `JsonGenerator` feature, instead of caller converting to String