@Override
        public void encodeDATA(byte[] value) {
            // This could be done more efficiently ...
            Tensor tensor = tensorFromData(value);
            byte[] encodedTensor = JsonFormat.encode(tensor, tensorOptions);
            target().append(new String(encodedTensor, StandardCharsets.UTF_8));
        }
A JSON encoder which encodes DATA as a tensor
container-search/src/main/java/com/yahoo/search/result/FeatureData.java