Package org.appng.search.json
Class Json
- java.lang.Object
-
- org.appng.search.json.Json
-
public class Json extends Object
Helper class to convert an object to it's JSON representation and vice versa.- Author:
- Matthias Müller
-
-
Constructor Summary
Constructors Constructor Description Json()Json(DateFormat dateFormat, boolean pretty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoJson(Object o)StringtoJson(Object o, com.fasterxml.jackson.annotation.JsonInclude.Include include)<T> TtoObject(String json, Class<T> type, com.fasterxml.jackson.databind.Module... modules)
-
-
-
Constructor Detail
-
Json
public Json(DateFormat dateFormat, boolean pretty)
-
Json
public Json()
-
-
Method Detail
-
toJson
public String toJson(Object o, com.fasterxml.jackson.annotation.JsonInclude.Include include) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptionIOException
-
toJson
public String toJson(Object o) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptionIOException
-
toObject
public <T> T toObject(String json, Class<T> type, com.fasterxml.jackson.databind.Module... modules) throws IOException
- Throws:
IOException
-
-