private static JsonFactory createGeneratorFactory() {
        return Jackson.createMapper(new JsonFactoryBuilder()
                .streamReadConstraints(StreamReadConstraints.builder().maxStringLength(Integer.MAX_VALUE).build()))
                .disable(FLUSH_AFTER_WRITE_VALUE).getFactory();
    }
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/rendering/JsonRenderer.java