public static byte[] encode(Tensor tensor, boolean shortForm, boolean directValues) {
        return encode(tensor, new EncodeOptions(shortForm, directValues, false));
    }
Serializes the given tensor value into JSON format.

@param tensor the tensor to serialize
@param shortForm whether to encode in a short type-dependent format
@param directValues whether to encode values directly, or wrapped in am object containing "type" and "cells"
vespajlib/src/main/java/com/yahoo/tensor/serialization/JsonFormat.java