private StringBuilder writeJson(Map<String, Tensor> values, JsonFormat.EncodeOptions tensorOptions, StringBuilder target) {
        target.append("{");
        for (Map.Entry<String, Tensor> entry : values.entrySet()) {
            target.append("\"").append(entry.getKey()).append("\":");
            if (entry.getValue().type().rank() == 0) {
                target.append(entry.getValue().asDouble());
            } else {
                byte[] encodedTensor = JsonFormat.encode(entry.getValue(), tensorOptions);
                target.append(new String(encodedTensor, StandardCharsets.UTF_8));
            }
            target.append(",");
        }
        if (!values.isEmpty()) target.setLength(target.length() - 1); // remove last comma
        target.append("}");
        return target;
    }
Returns the fields of this as an inspector, where tensors are represented as binary data
which can be decoded using
<code>com.yahoo.tensor.serialization.TypedBinaryFormat.decode(Optional.empty(), GrowableByteBuffer.wrap(featureValue.asData()))</code>
container-search/src/main/java/com/yahoo/search/result/FeatureData.java