This is an automated email from the ASF dual-hosted git repository.
stillalex pushed a commit to branch branch_9_4
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_4 by this push:
new c189d242568 SOLR-17009 json.wrf parameter ignored in JacksonJsonWriter
(#1980)
c189d242568 is described below
commit c189d24256841ffd9664983fa30ed0fde9ef14bb
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();