public class BeanJsonConverter extends Object implements BeanConverter
| Constructor and Description |
|---|
BeanJsonConverter(com.google.inject.Injector injector) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Appendable buf,
Object pojo)
Serialize object to a buffer.
|
Object |
convertToObject(Object value,
Type type) |
<T> T |
convertToObject(String string,
Class<T> clazz) |
<T> T |
convertToObject(String json,
Type type) |
String |
convertToString(Object pojo)
Convert the passed in object to a string.
|
String |
getContentType() |
@Inject public BeanJsonConverter(com.google.inject.Injector injector)
public String getContentType()
getContentType in interface BeanConverterpublic String convertToString(Object pojo)
convertToString in interface BeanConverterpojo - The object to convertpublic void append(Appendable buf, Object pojo) throws IOException
BeanConverterappend in interface BeanConverterbuf - Buffer to append topojo - Object to serializeIOException - If Appendable.append(char) throws an exception.public <T> T convertToObject(String string, Class<T> clazz)
convertToObject in interface BeanConverterCopyright © 2007-2012. All Rights Reserved.