public interface JsonUtils
| Modifier and Type | Interface and Description |
|---|---|
static class |
JsonUtils.Impl
An implementation of
JsonUtils. |
| Modifier and Type | Method and Description |
|---|---|
<P> P |
fromJson(javax.servlet.http.HttpServletRequest request)
Convert the body of an
HttpServletRequest into an of the proper
type as found in the "@class" directive in the Json. |
<P> P |
fromJson(com.fasterxml.jackson.databind.JsonNode jsonNode)
Convert a
JsonNode into an object of the proper type as found in
the "@class" directive in the JsonNode. |
com.fasterxml.jackson.databind.JsonNode |
getJsonContentFromRequest(javax.servlet.http.HttpServletRequest request)
Retrieves the
JsonNode from the request. |
<P> String |
toJson(P payload)
Convert an object of type
|
<P> String |
toJsonUnchecked(P payload)
Convert an object of type
|
<P> String toJson(P payload) throws com.fasterxml.jackson.core.JsonProcessingException
into a Json String.
payload - com.fasterxml.jackson.core.JsonProcessingException<P> String toJsonUnchecked(P payload) throws RuntimeException
into a Json String.
payload - RuntimeException<P> P fromJson(javax.servlet.http.HttpServletRequest request)
throws IOException,
ClassNotFoundException
HttpServletRequest into an of the proper
type as found in the "@class" directive in the Json.request - IOExceptionClassNotFoundException<P> P fromJson(com.fasterxml.jackson.databind.JsonNode jsonNode)
throws ClassNotFoundException
JsonNode into an object of the proper type as found in
the "@class" directive in the JsonNode.jsonNode - ClassNotFoundExceptioncom.fasterxml.jackson.databind.JsonNode getJsonContentFromRequest(javax.servlet.http.HttpServletRequest request)
throws IOException,
ClassNotFoundException
JsonNode from the request.request - IOExceptionClassNotFoundExceptionCopyright © 2014 Sappenin Inc.. All rights reserved.