org.jboss.seam.social
Class JsonMapper
java.lang.Object
org.jboss.seam.social.JsonMapper
- All Implemented Interfaces:
- Serializable
@ApplicationScoped
public class JsonMapper
- extends Object
- implements Serializable
This Bean manage the Json Mapper to serialize and de-serialize Json data coming from and sent to services It uses an
ObjectMapper
Jackson.
- Author:
- Antoine Sabot-Durand
- See Also:
- Serialized Form
Method Summary |
|
readValue(RestResponse resp,
Class<T> clazz)
Parse the content of the provided RestResponse to de-serialize to an object of the given Class |
void |
registerModule(org.codehaus.jackson.map.Module module)
Register a Jackson configuration Module to set special rules for de-serialization |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonMapper
public JsonMapper()
readValue
public <T> T readValue(RestResponse resp,
Class<T> clazz)
- Parse the content of the provided
RestResponse
to de-serialize to an object of the given Class
- Parameters:
resp
- the response to de-serializeclazz
- the target class of the object
- Returns:
- an object of the given Class with fields comming from the response
registerModule
public void registerModule(org.codehaus.jackson.map.Module module)
- Register a Jackson configuration
Module
to set special rules for de-serialization
- Parameters:
module
- to register
Copyright © 2011 Seam Framework. All Rights Reserved.