This is an automated email from the ASF dual-hosted git repository.

stillalex pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 0c085ba46c9 SOLR-17009 json.wrf parameter ignored in JacksonJsonWriter 
(#1980)
0c085ba46c9 is described below

commit 0c085ba46c97d9f4bf230cf6dfe892f494f7ce66
Author: Alex D <[email protected]>
AuthorDate: Wed Oct 4 17:14:27 2023 -0700

    SOLR-17009 json.wrf parameter ignored in JacksonJsonWriter (#1980)
    
    (cherry picked from commit 204ff1ddb7d3571ed15157a0254737085d3996b3)
---
 solr/core/src/java/org/apache/solr/response/JacksonJsonWriter.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/response/JacksonJsonWriter.java 
b/solr/core/src/java/org/apache/solr/response/JacksonJsonWriter.java
index 79b09ae3bf4..611223fd216 100644
--- a/solr/core/src/java/org/apache/solr/response/JacksonJsonWriter.java
+++ b/solr/core/src/java/org/apache/solr/response/JacksonJsonWriter.java
@@ -19,6 +19,7 @@ package org.apache.solr.response;
 import com.fasterxml.jackson.core.JsonEncoding;
 import com.fasterxml.jackson.core.JsonFactory;
 import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.util.DefaultIndenter;
 import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -34,7 +35,8 @@ public class JacksonJsonWriter extends BinaryResponseWriter {
   protected static final DefaultPrettyPrinter pretty =
       new DefaultPrettyPrinter()
           .withoutSpacesInObjectEntries()
-          .withArrayIndenter(DefaultPrettyPrinter.NopIndenter.instance);
+          .withArrayIndenter(DefaultPrettyPrinter.NopIndenter.instance)
+          .withObjectIndenter(new DefaultIndenter().withLinefeed("\n"));
 
   public JacksonJsonWriter() {
     super();

Reply via email to