private void header(XMLWriter writer, Result result) {
        writer.xmlHeader(getRequestedEncoding(result.getQuery()));
        writer.openTag("page").attribute("version", "1.0")
                              .attribute("layout", result.hits().getField("layout"));
        renderCoverageAttributes(result.getCoverage(false), writer);
        writer.closeStartTag();
        renderSectionContent(writer, result.hits());
    }
Creates a json renderer using a custom executor.
Using a custom executor is useful for tests to avoid creating new threads for each renderer registry.
container-search/src/main/java/com/yahoo/search/pagetemplates/result/PageTemplatesXmlRenderer.java