Package info.ejava.examples.common.dto
Class JsonUtil
java.lang.Object
info.ejava.examples.common.dto.DtoUtil
info.ejava.examples.common.dto.JsonUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final JsonUtil
protected final com.fasterxml.jackson.databind.ObjectMapper
Fields inherited from class info.ejava.examples.common.dto.DtoUtil
DATE_FORMAT, DATETIME_FORMAT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonUtil
instance()
<T> void
marshalThrows
(T object, OutputStream os) <T> T
unmarshalThrows
(InputStream is, Class<T> type) Methods inherited from class info.ejava.examples.common.dto.DtoUtil
init, marshal, marshal, marshalAsBytes, marshalThrows, unmarshal, unmarshal, unmarshal, unmarshalThrows
-
Field Details
-
instance
-
mapper
protected final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Constructor Details
-
JsonUtil
public JsonUtil() -
JsonUtil
public JsonUtil(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
marshalThrows
- Specified by:
marshalThrows
in classDtoUtil
- Throws:
IOException
-
unmarshalThrows
- Specified by:
unmarshalThrows
in classDtoUtil
- Throws:
IOException
-
instance
-