private JsonFormat.EncodeOptions tensorOptions() {
            // TODO: Flip default on Vespa 9 to "short-value"
            String format = "short";
            if (request != null && request.parameters().containsKey("format.tensors")) {
                var params = request.parameters().get("format.tensors");
                if (params.size() == 1) {
                    format = params.get(0);
                }
            }
            return switch (format) {
                case "hex" ->
                        new JsonFormat.EncodeOptions(true, false, true);
                case "hex-value" ->
                        new JsonFormat.EncodeOptions(true, true, true);
                default ->
                        // aka "short"
                        new JsonFormat.EncodeOptions(true, false, false);
                case "short-value" ->
                        new JsonFormat.EncodeOptions(true, true, false);
                case "long" ->
                        new JsonFormat.EncodeOptions(false, false, false);
                case "long-value" ->
                        new JsonFormat.EncodeOptions(false, true, false);
            };
        }
Closes the JSON and the output content channel of this.
vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java