diff --git a/src/main/java/com/google/devtools/build/lib/query2/query/output/JsonOutputFormatter.java b/src/main/java/com/google/devtools/build/lib/query2/query/output/JsonOutputFormatter.java index 57b890fabc3bfe..4d445e53bda336 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/query/output/JsonOutputFormatter.java +++ b/src/main/java/com/google/devtools/build/lib/query2/query/output/JsonOutputFormatter.java @@ -28,7 +28,6 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.sun.org.apache.xpath.internal.operations.Bool; import java.io.IOException; import java.io.OutputStream; import java.util.Iterator; @@ -63,7 +62,7 @@ public OutputFormatterCallback createPostFactoStreamCallback( return new OutputFormatterCallback() { private JsonObject result = new JsonObject(); - private Gson gson = new GsonBuilder().setPrettyPrinting().create(); + private Gson gson = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create(); @Override public void processOutput(Iterable partialResult) @@ -104,7 +103,7 @@ private static JsonObject createTargetJsonObject(Target target) { } private static JsonElement getJsonFromValue(Object val) { - Gson gson = new Gson(); + Gson gson = new GsonBuilder().disableHtmlEscaping().create(); if (val instanceof List) { Iterator it = ((List) val).iterator(); JsonArray result = new JsonArray();