summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/databinding-json
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-05-27 05:59:55 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-05-27 05:59:55 +0000
commitd3629e7430f866f69d71144119199b52f020ca58 (patch)
tree252e80cd3c880083b06bcdf0af09ca2ff29f49ac /sca-java-2.x/trunk/modules/databinding-json
parentd732ec25dea1575cf5ddcfd211a76b5ac4adfacc (diff)
Add array support for the transformer
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@948680 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/databinding-json')
-rw-r--r--sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/Object2JSON.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/Object2JSON.java b/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/Object2JSON.java
index bd99dfd881..0948341b76 100644
--- a/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/Object2JSON.java
+++ b/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/Object2JSON.java
@@ -54,7 +54,7 @@ public class Object2JSON implements PullTransformer<Object, Object> {
}
try {
String value = mapper.writeValueAsString(source);
- if (targetType == String.class) {
+ if (targetType == String.class || targetType == Object.class) {
return value;
} else if (JsonNode.class.isAssignableFrom(targetType)) {
return JacksonHelper.createJsonParser(value).readValueAsTree();