org.hudsonci.rest.common
Class JacksonCodec
java.lang.Object
org.hudsonci.rest.common.JacksonCodec
- All Implemented Interfaces:
- JsonCodec
@Named
@Singleton
public class JacksonCodec
- extends Object
- implements JsonCodec
Jackson JSON codec.
- Since:
- 2.1.0
- Author:
- Jason Dillon
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JacksonCodec
@Inject
public JacksonCodec(org.codehaus.jackson.map.ObjectMapper mapper)
JacksonCodec
public JacksonCodec()
getMapper
public org.codehaus.jackson.map.ObjectMapper getMapper()
encode
public String encode(Object value)
throws IOException
- Specified by:
encode in interface JsonCodec
- Throws:
IOException
decode
public <T> T decode(String value,
Class<T> type)
throws IOException
- Specified by:
decode in interface JsonCodec
- Throws:
IOException
Copyright © 2004-2011 Hudson. All Rights Reserved.