diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-01 21:21:25 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-01 21:21:25 +0000 |
commit | b11e2ee704563e82f8b981cbcc672c4fb65bbc80 (patch) | |
tree | 5f504b41c2d9cb1f59d1d4b7287773e9cbeea6f4 /sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JSON2Object.java | |
parent | ec66e5f51bc9d17d5332cdc4d30021801c355ae8 (diff) |
Enhance the JSON databindign with Jackson 1.5.0
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@930100 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JSON2Object.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JSON2Object.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JSON2Object.java b/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JSON2Object.java index 6e9f0623f1..5edcc6701e 100644 --- a/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JSON2Object.java +++ b/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JSON2Object.java @@ -26,12 +26,9 @@ import org.apache.tuscany.sca.databinding.javabeans.JavaBeansDataBinding; import org.apache.tuscany.sca.databinding.json.JSONDataBinding; import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.map.AnnotationIntrospector; import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector; import org.codehaus.jackson.map.type.TypeFactory; import org.codehaus.jackson.type.JavaType; -import org.codehaus.jackson.xc.JaxbAnnotationIntrospector; /** * @version $Rev$ $Date$ @@ -41,12 +38,7 @@ public class JSON2Object implements PullTransformer<Object, Object> { public JSON2Object() { super(); - mapper = new ObjectMapper(); - AnnotationIntrospector primary = new JaxbAnnotationIntrospector(); - AnnotationIntrospector secondary = new JacksonAnnotationIntrospector(); - AnnotationIntrospector pair = new AnnotationIntrospector.Pair(primary, secondary); - mapper.getDeserializationConfig().setAnnotationIntrospector(pair); - mapper.getSerializationConfig().setAnnotationIntrospector(pair); + mapper = JacksonHelper.createObjectMapper(); } public Object transform(Object source, TransformationContext context) { |