diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/JsonServlet.java | 1 | ||||
-rw-r--r-- | src/main/java/com/gitblit/utils/JsonUtils.java | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/JsonServlet.java b/src/main/java/com/gitblit/JsonServlet.java index 3ad2b7d2..3ee4a272 100644 --- a/src/main/java/com/gitblit/JsonServlet.java +++ b/src/main/java/com/gitblit/JsonServlet.java @@ -123,6 +123,7 @@ public abstract class JsonServlet extends HttpServlet { // Send JSON response
String json = JsonUtils.toJsonString(o);
response.setCharacterEncoding(Constants.ENCODING);
+ response.setContentType("application/json");
response.getWriter().append(json);
}
}
diff --git a/src/main/java/com/gitblit/utils/JsonUtils.java b/src/main/java/com/gitblit/utils/JsonUtils.java index 24f4ecb8..e9241827 100644 --- a/src/main/java/com/gitblit/utils/JsonUtils.java +++ b/src/main/java/com/gitblit/utils/JsonUtils.java @@ -268,7 +268,6 @@ public class JsonUtils { GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(Date.class, new GmtDateTypeAdapter());
builder.registerTypeAdapter(AccessPermission.class, new AccessPermissionTypeAdapter());
- builder.setPrettyPrinting();
if (!ArrayUtils.isEmpty(strategies)) {
builder.setExclusionStrategies(strategies);
}
|