Package ubic.gemma.web.util
Class JsonUtil
- java.lang.Object
-
- ubic.gemma.web.util.JsonUtil
-
public final class JsonUtil extends Object
Utilities for writing JSON payloads toHttpServletResponse
.
-
-
Constructor Summary
Constructors Constructor Description JsonUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
writeErrorToResponse(int status, String message, javax.servlet.http.HttpServletResponse response)
static void
writeErrorToResponse(Exception e, javax.servlet.http.HttpServletResponse response)
static void
writeErrorToResponse(org.springframework.security.core.AuthenticationException e, javax.servlet.http.HttpServletResponse response)
static void
writeToResponse(org.json.JSONObject json, javax.servlet.http.HttpServletResponse response)
-
-
-
Method Detail
-
writeErrorToResponse
public static void writeErrorToResponse(org.springframework.security.core.AuthenticationException e, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
writeErrorToResponse
public static void writeErrorToResponse(Exception e, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
writeErrorToResponse
public static void writeErrorToResponse(int status, String message, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
writeToResponse
public static void writeToResponse(org.json.JSONObject json, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
-