public class BoxJSONParser extends java.lang.Object implements IBoxJSONParser
Constructor and Description |
---|
BoxJSONParser(IBoxResourceHub hub) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convertBoxObjectToJSONString(java.lang.Object object)
Convert the object into String.
|
java.lang.String |
convertBoxObjectToJSONStringQuietly(java.lang.Object object)
Convert the object into String.
|
protected com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
<T> T |
parseIntoBoxObject(java.io.InputStream inputStream,
java.lang.Class<T> theClass)
Convert InputStream to object.
|
<T> T |
parseIntoBoxObject(java.lang.String jsonString,
java.lang.Class<T> theClass)
Convert the json string into object.
|
<T> T |
parseIntoBoxObjectQuietly(java.io.InputStream inputStream,
java.lang.Class<T> theClass)
Convert InputStream to object.No exception will be thrown, in case of failure, null is returned.
|
<T> T |
parseIntoBoxObjectQuietly(java.lang.String jsonString,
java.lang.Class<T> theClass)
Convert the json string into object.No exception will be thrown, in case of failure, null is returned.
|
public BoxJSONParser(IBoxResourceHub hub)
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public java.lang.String convertBoxObjectToJSONStringQuietly(java.lang.Object object)
IBoxJSONParser
convertBoxObjectToJSONStringQuietly
in interface IBoxJSONParser
public <T> T parseIntoBoxObjectQuietly(java.io.InputStream inputStream, java.lang.Class<T> theClass)
IBoxJSONParser
parseIntoBoxObjectQuietly
in interface IBoxJSONParser
public <T> T parseIntoBoxObjectQuietly(java.lang.String jsonString, java.lang.Class<T> theClass)
IBoxJSONParser
parseIntoBoxObjectQuietly
in interface IBoxJSONParser
public java.lang.String convertBoxObjectToJSONString(java.lang.Object object) throws BoxJSONException, java.io.IOException
IBoxJSONParser
convertBoxObjectToJSONString
in interface IBoxJSONParser
BoxJSONException
java.io.IOException
public <T> T parseIntoBoxObject(java.io.InputStream inputStream, java.lang.Class<T> theClass) throws BoxJSONException, java.io.IOException
IBoxJSONParser
parseIntoBoxObject
in interface IBoxJSONParser
BoxJSONException
java.io.IOException
public <T> T parseIntoBoxObject(java.lang.String jsonString, java.lang.Class<T> theClass) throws BoxJSONException, java.io.IOException
IBoxJSONParser
parseIntoBoxObject
in interface IBoxJSONParser
BoxJSONException
java.io.IOException