summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/databinding-json
diff options
context:
space:
mode:
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();