</BUG>
{
try (JsonGenerator json = jsonFactory.createJsonGenerator(new OutputStreamWriter(out, "UTF-8")))
{
<BUG>JsonTransformer transformer = new JsonTransformer(json, currentScanner, metadata);
</BUG>
json.writeStartArray();
keys.forEach(transformer::serializePartitionKey);
json.writeEndArray();
}

json.writeStartArray();
partitions.forEach(transformer::serializePartition);
json.writeEndArray();
}
}
public static void keysToJson(ISSTableScanner currentScanner, Stream<DecoratedKey> keys, boolean rawTime, CFMetaData metadata, OutputStream out) throws IOException
{
try (JsonGenerator json = jsonFactory.createJsonGenerator(new OutputStreamWriter(out, "UTF-8")))
{
JsonTransformer transformer = new JsonTransformer(json, currentScanner, rawTime, metadata);
json.writeStartArray();
keys.forEach(transformer::serializePartitionKey);
json.writeEndArray();
