You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/08/29 16:06:51 UTC

git commit: Reverting previous change; jumped the gun on that one.

Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o ef707147c -> b09b154a0


Reverting previous change; jumped the gun on that one.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/b09b154a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/b09b154a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/b09b154a

Branch: refs/heads/two-dot-o
Commit: b09b154a0880017569a3b1f21cedcfa9856fdd66
Parents: ef70714
Author: Dave Johnson <dm...@apigee.com>
Authored: Fri Aug 29 10:06:31 2014 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Fri Aug 29 10:06:31 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/usergrid/utils/JsonUtils.java  | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b09b154a/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java
index f81d6bf..4db2ce2 100644
--- a/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java
@@ -42,12 +42,6 @@ import com.fasterxml.jackson.dataformat.smile.SmileFactory;
 import static org.apache.commons.lang.StringUtils.substringAfter;
 import static org.apache.usergrid.utils.StringUtils.stringOrSubstringBeforeFirst;
 
-//import org.codehaus.jackson.JsonNode;
-//import org.codehaus.jackson.io.JsonStringEncoder;
-//import org.codehaus.jackson.map.ObjectMapper;
-//import org.codehaus.jackson.map.SerializationConfig.Feature;
-//import org.codehaus.jackson.smile.SmileFactory;
-
 
 public class JsonUtils {
 
@@ -63,8 +57,8 @@ public class JsonUtils {
 
 
     static {
-        mapper.enable(SerializationFeature.INDENT_OUTPUT);
-        mapper.enableDefaultTypingAsProperty(ObjectMapper.DefaultTyping.JAVA_LANG_OBJECT, "@class");
+        //indentObjectMapper.getSerializationConfig().set( Feature.INDENT_OUTPUT, true );
+        indentObjectMapper.getSerializationConfig().with( SerializationFeature.INDENT_OUTPUT );
     }
 
 
@@ -83,7 +77,7 @@ public class JsonUtils {
     /** Converts object to JSON string, throws runtime exception JsonWriteException on failure. */
     public static String mapToFormattedJsonString( Object obj ) {
         try {
-            return indentObjectMapper.writeValueAsString( obj );
+            return mapper.writeValueAsString( obj );
         }
         catch ( Throwable t ) {
             LOG.debug( "Error generating JSON", t );