diff --git a/asterixdb/asterix-algebra/pom.xml b/asterixdb/asterix-algebra/pom.xml
index f53997e..dc195e2 100644
--- a/asterixdb/asterix-algebra/pom.xml
+++ b/asterixdb/asterix-algebra/pom.xml
@@ -171,10 +171,6 @@
       <artifactId>algebricks-rewriter</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
       <version>3.5</version>
diff --git a/asterixdb/asterix-app/pom.xml b/asterixdb/asterix-app/pom.xml
index 79c0c6a..ae93779 100644
--- a/asterixdb/asterix-app/pom.xml
+++ b/asterixdb/asterix-app/pom.xml
@@ -196,16 +196,6 @@
       <scope>compile</scope>
     </dependency>
     <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-core</artifactId>
-      <version>2.8.4</version>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-      <version>2.8.4</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-control-cc</artifactId>
     </dependency>
@@ -326,5 +316,13 @@
       <type>jar</type>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
index f9794e4..754b7f9 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
@@ -18,7 +18,6 @@
  */
 package org.apache.asterix.api.common;
 
-
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.rmi.RemoteException;
@@ -30,6 +29,7 @@
 import java.util.Random;
 import java.util.Set;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslator;
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslatorFactory;
 import org.apache.asterix.api.common.Job.SubmissionMode;
@@ -90,7 +90,6 @@
 import org.apache.hyracks.api.client.NodeControllerInfo;
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.api.job.JobSpecification;
-import org.json.JSONException;
 
 /**
  * Provides helper methods for compilation of a query into a JobSpec and submission
@@ -161,9 +160,8 @@
         return new Pair<>(q, q.getVarCounter());
     }
 
-    public JobSpecification compileQuery(IClusterInfoCollector clusterInfoCollector,
-            MetadataProvider metadataProvider, Query rwQ, int varCounter, String outputDatasetName,
-            SessionConfig conf, ICompiledDmlStatement statement)
+    public JobSpecification compileQuery(IClusterInfoCollector clusterInfoCollector, MetadataProvider metadataProvider,
+            Query rwQ, int varCounter, String outputDatasetName, SessionConfig conf, ICompiledDmlStatement statement)
             throws AlgebricksException, RemoteException, ACIDException {
 
         if (!conf.is(SessionConfig.FORMAT_ONLY_PHYSICAL_OPS) && conf.is(SessionConfig.OOB_REWRITTEN_EXPR_TREE)) {
@@ -178,8 +176,8 @@
 
         org.apache.asterix.common.transactions.JobId asterixJobId = JobIdFactory.generateJobId();
         metadataProvider.setJobId(asterixJobId);
-        ILangExpressionToPlanTranslator t =
-                translatorFactory.createExpressionToPlanTranslator(metadataProvider, varCounter);
+        ILangExpressionToPlanTranslator t = translatorFactory.createExpressionToPlanTranslator(metadataProvider,
+                varCounter);
 
         ILogicalPlan plan;
         // statement = null when it's a query
@@ -217,8 +215,8 @@
         OptimizationConfUtil.getPhysicalOptimizationConfig().setMaxFramesExternalGroupBy(groupFrameLimit);
         OptimizationConfUtil.getPhysicalOptimizationConfig().setMaxFramesForJoin(joinFrameLimit);
 
-        HeuristicCompilerFactoryBuilder builder =
-                new HeuristicCompilerFactoryBuilder(OptimizationContextFactory.INSTANCE);
+        HeuristicCompilerFactoryBuilder builder = new HeuristicCompilerFactoryBuilder(
+                OptimizationContextFactory.INSTANCE);
         builder.setPhysicalOptimizationConfig(OptimizationConfUtil.getPhysicalOptimizationConfig());
         builder.setLogicalRewrites(ruleSetFactory.getLogicalRewrites());
         builder.setPhysicalRewrites(ruleSetFactory.getPhysicalRewrites());
@@ -304,16 +302,17 @@
         builder.setTypeTraitProvider(format.getTypeTraitProvider());
         builder.setNormalizedKeyComputerFactoryProvider(format.getNormalizedKeyComputerFactoryProvider());
 
-        JobEventListenerFactory jobEventListenerFactory =
-                new JobEventListenerFactory(asterixJobId, metadataProvider.isWriteTransaction());
+        JobEventListenerFactory jobEventListenerFactory = new JobEventListenerFactory(asterixJobId,
+                metadataProvider.isWriteTransaction());
         JobSpecification spec = compiler.createJob(AppContextInfo.INSTANCE, jobEventListenerFactory);
 
         if (conf.is(SessionConfig.OOB_HYRACKS_JOB)) {
             printPlanPrefix(conf, "Hyracks job");
             if (rwQ != null) {
                 try {
-                    conf.out().println(spec.toJSON().toString(1));
-                } catch (JSONException e) {
+                    conf.out().println(
+                            new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(spec.toJSON()));
+                } catch (IOException e) {
                     throw new AlgebricksException(e);
                 }
                 conf.out().println(spec.getUserConstraints());
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java
index 02be70b..988b5bb 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java
@@ -31,12 +31,17 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import org.apache.asterix.common.config.AsterixProperties;
+import org.apache.asterix.common.config.ExternalProperties;
+import org.apache.asterix.common.utils.JSONUtil;
 import org.apache.asterix.common.config.AbstractProperties;
 import org.apache.asterix.common.config.ReplicationProperties;
 import org.apache.asterix.runtime.util.ClusterStateManager;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ClusterAPIServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
@@ -53,6 +58,7 @@
     protected static final String REPLICATION_URI_KEY = "replicationUri";
     private static final Pattern PARENT_DIR = Pattern.compile("/[^./]+/\\.\\./");
     private static final Pattern REPLICATION_PROPERTY = Pattern.compile("^replication\\.");
+    private final ObjectMapper om = new ObjectMapper();
 
     @Override
     public final void doGet(HttpServletRequest request, HttpServletResponse response) {
@@ -67,9 +73,8 @@
         response.setContentType("application/json");
         response.setCharacterEncoding("utf-8");
         PrintWriter responseWriter = response.getWriter();
-        JSONObject json;
-
         try {
+            ObjectNode json;
             switch (request.getPathInfo() == null ? "" : request.getPathInfo()) {
                 case "":
                     json = getClusterStateJSON(request, "");
@@ -84,7 +89,7 @@
                     throw new IllegalArgumentException();
             }
             response.setStatus(HttpServletResponse.SC_OK);
-            responseWriter.write(json.toString(4));
+            responseWriter.write(JSONUtil.convertNode(json));
         } catch (IllegalArgumentException e) { // NOSONAR - exception not logged or rethrown
             response.sendError(HttpServletResponse.SC_NOT_FOUND);
         } catch (Exception e) {
@@ -94,15 +99,15 @@
         responseWriter.flush();
     }
 
-    protected JSONObject getClusterStateSummaryJSON() throws JSONException {
+    protected ObjectNode getClusterStateSummaryJSON() {
         return ClusterStateManager.INSTANCE.getClusterStateSummary();
     }
 
-    protected JSONObject getReplicationJSON() throws JSONException {
+    protected ObjectNode getReplicationJSON() {
         for (AbstractProperties props : getPropertiesInstances()) {
             if (props instanceof ReplicationProperties) {
-                JSONObject json = new JSONObject();
-                json.put("config", props.getProperties(key -> REPLICATION_PROPERTY.matcher(key).replaceFirst("")));
+                ObjectNode json = om.createObjectNode();
+                json.putPOJO("config", props.getProperties(key -> REPLICATION_PROPERTY.matcher(key).replaceFirst("")));
                 return json;
             }
         }
@@ -123,13 +128,12 @@
         return AbstractProperties.getImplementations();
     }
 
-    protected JSONObject getClusterStateJSON(HttpServletRequest request, String pathToNode) throws JSONException {
-        JSONObject json;
-        json = ClusterStateManager.INSTANCE.getClusterStateDescription();
+    protected ObjectNode getClusterStateJSON(HttpServletRequest request, String pathToNode) {
+        ObjectNode json = ClusterStateManager.INSTANCE.getClusterStateDescription();
         Map<String, Object> allProperties = getAllClusterProperties();
-        json.put("config", allProperties);
+        json.putPOJO("config", allProperties);
 
-        JSONArray ncs = json.getJSONArray("ncs");
+        ArrayNode ncs = (ArrayNode) json.get("ncs");
         final StringBuilder requestURL = new StringBuilder(request.getRequestURL());
         if (requestURL.charAt(requestURL.length() - 1) != '/') {
             requestURL.append('/');
@@ -138,18 +142,18 @@
         String clusterURL = canonicalize(requestURL);
         String adminURL = canonicalize(clusterURL + "../");
         String nodeURL = clusterURL + "node/";
-        for (int i = 0; i < ncs.length(); i++) {
-            JSONObject nc = ncs.getJSONObject(i);
-            nc.put(CONFIG_URI_KEY, nodeURL + nc.getString(NODE_ID_KEY) + "/config");
-            nc.put(STATS_URI_KEY, nodeURL + nc.getString(NODE_ID_KEY) + "/stats");
-            nc.put(THREAD_DUMP_URI_KEY, nodeURL + nc.getString(NODE_ID_KEY) + "/threaddump");
+        for (int i = 0; i < ncs.size(); i++) {
+            ObjectNode nc = (ObjectNode) ncs.get(i);
+            nc.put(CONFIG_URI_KEY, nodeURL + nc.get(NODE_ID_KEY).asText() + "/config");
+            nc.put(STATS_URI_KEY, nodeURL + nc.get(NODE_ID_KEY).asText() + "/stats");
+            nc.put(THREAD_DUMP_URI_KEY, nodeURL + nc.get(NODE_ID_KEY).asText() + "/threaddump");
         }
-        JSONObject cc;
+        ObjectNode cc;
         if (json.has("cc")) {
-            cc = json.getJSONObject("cc");
+            cc = (ObjectNode) json.get("cc");
         } else {
-            cc = new JSONObject();
-            json.put("cc", cc);
+            cc = om.createObjectNode();
+            json.set("cc", cc);
         }
         cc.put(CONFIG_URI_KEY, clusterURL + "cc/config");
         cc.put(STATS_URI_KEY, clusterURL + "cc/stats");
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterCCDetailsAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterCCDetailsAPIServlet.java
index 75fba74..569d5a0 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterCCDetailsAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterCCDetailsAPIServlet.java
@@ -29,30 +29,31 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ClusterCCDetailsAPIServlet extends ClusterAPIServlet {
     private static final long serialVersionUID = 1L;
     private static final Logger LOGGER = Logger.getLogger(ClusterCCDetailsAPIServlet.class.getName());
+    private final ObjectMapper om = new ObjectMapper();
 
     @Override
     protected void getUnsafe(HttpServletRequest request, HttpServletResponse response) throws IOException {
         PrintWriter responseWriter = response.getWriter();
         ServletContext context = getServletContext();
         IHyracksClientConnection hcc = (IHyracksClientConnection) context.getAttribute(HYRACKS_CONNECTION_ATTR);
-        JSONObject json;
-
         try {
+            ObjectNode json;
             if (request.getPathInfo() == null) {
-                json = getClusterStateJSON(request, "../").getJSONObject("cc");
+                json = (ObjectNode) getClusterStateJSON(request, "../").get("cc");
             } else {
                 json = processNode(request, hcc);
             }
             response.setStatus(HttpServletResponse.SC_OK);
             response.setContentType("application/json");
             response.setCharacterEncoding("utf-8");
-            responseWriter.write(json.toString(4));
+            responseWriter.write(new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(json));
         } catch (IllegalArgumentException e) { // NOSONAR - exception not logged or rethrown
             response.sendError(HttpServletResponse.SC_NOT_FOUND);
         } catch (Exception e) {
@@ -62,8 +63,7 @@
         responseWriter.flush();
     }
 
-    private JSONObject processNode(HttpServletRequest request, IHyracksClientConnection hcc)
-            throws Exception {
+    private ObjectNode processNode(HttpServletRequest request, IHyracksClientConnection hcc) throws Exception {
         String pathInfo = request.getPathInfo();
         if (pathInfo.endsWith("/")) {
             throw new IllegalArgumentException();
@@ -71,13 +71,13 @@
         String[] parts = pathInfo.substring(1).split("/");
 
         if (request.getPathInfo() == null) {
-            return getClusterStateJSON(request, "../../").getJSONObject("cc");
+            return (ObjectNode) getClusterStateJSON(request, "../../").get("cc");
         } else if (parts.length == 1) {
             switch (parts[0]) {
                 case "config":
-                    return new JSONObject(hcc.getNodeDetailsJSON(null, false, true));
+                    return om.readValue(hcc.getNodeDetailsJSON(null, false, true), ObjectNode.class);
                 case "stats":
-                    return new JSONObject(hcc.getNodeDetailsJSON(null, true, false));
+                    return om.readValue(hcc.getNodeDetailsJSON(null, true, false), ObjectNode.class);
                 case "threaddump":
                     return processCCThreadDump(hcc);
 
@@ -90,12 +90,12 @@
         }
     }
 
-    private JSONObject processCCThreadDump(IHyracksClientConnection hcc) throws Exception {
+    private ObjectNode processCCThreadDump(IHyracksClientConnection hcc) throws Exception {
         String dump = hcc.getThreadDump(null);
         if (dump == null) {
             throw new IllegalArgumentException();
         }
-        return new JSONObject(dump);
+        return (ObjectNode) om.readTree(dump);
     }
 
 }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterNodeDetailsAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterNodeDetailsAPIServlet.java
index 1489e55..590e869 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterNodeDetailsAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterNodeDetailsAPIServlet.java
@@ -29,37 +29,45 @@
 import java.util.logging.Logger;
 
 import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
 import org.apache.asterix.runtime.util.ClusterStateManager;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ClusterNodeDetailsAPIServlet extends ClusterAPIServlet {
     private static final long serialVersionUID = 1L;
     private static final Logger LOGGER = Logger.getLogger(ClusterNodeDetailsAPIServlet.class.getName());
+    private final ObjectMapper om = new ObjectMapper();
+
+    @Override
+    public void init() throws ServletException{
+        om.enable(SerializationFeature.INDENT_OUTPUT);
+    }
 
     @Override
     protected void getUnsafe(HttpServletRequest request, HttpServletResponse response) throws IOException {
         PrintWriter responseWriter = response.getWriter();
         ServletContext context = getServletContext();
         IHyracksClientConnection hcc = (IHyracksClientConnection) context.getAttribute(HYRACKS_CONNECTION_ATTR);
-        JSONObject json;
-
         try {
+            ObjectNode json;
             if (request.getPathInfo() == null) {
-                json = new JSONObject();
-                json.put("ncs", getClusterStateJSON(request, "../").getJSONArray("ncs"));
+                json = om.createObjectNode();
+                json.set("ncs", getClusterStateJSON(request, "../").get("ncs"));
             } else {
                 json = processNode(request, hcc);
             }
             response.setStatus(HttpServletResponse.SC_OK);
             response.setContentType("application/json");
             response.setCharacterEncoding("utf-8");
-            responseWriter.write(json.toString(4));
+            responseWriter.write(om.writerWithDefaultPrettyPrinter().writeValueAsString(json));
         } catch (IllegalStateException e) { // NOSONAR - exception not logged or rethrown
             response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
         } catch (IllegalArgumentException e) { // NOSONAR - exception not logged or rethrown
@@ -71,7 +79,7 @@
         responseWriter.flush();
     }
 
-    private JSONObject processNode(HttpServletRequest request, IHyracksClientConnection hcc)
+    private ObjectNode processNode(HttpServletRequest request, IHyracksClientConnection hcc)
             throws Exception {
         String pathInfo = request.getPathInfo();
         if (pathInfo.endsWith("/")) {
@@ -81,19 +89,18 @@
         final String node = parts[0];
 
         if (parts.length == 1) {
-            JSONArray ncs = getClusterStateJSON(request, "../../").getJSONArray("ncs");
-            for (int i = 0; i < ncs.length(); i++) {
-                JSONObject json = ncs.getJSONObject(i);
-                if (node.equals(json.getString("node_id"))) {
-                    return json;
+            ArrayNode ncs = (ArrayNode) getClusterStateJSON(request, "../../").get("ncs");
+            for (int i = 0; i < ncs.size(); i++) {
+                if (node.equals(ncs.get(i).get("node_id").asText())) {
+                    return (ObjectNode) ncs.get(i);
                 }
             }
             if ("cc".equals(node)) {
-                return new JSONObject();
+                return om.createObjectNode();
             }
             throw new IllegalArgumentException();
         } else if (parts.length == 2) {
-            JSONObject json;
+            ObjectNode json;
 
             switch (parts[1]) {
                 case "config":
@@ -118,78 +125,78 @@
         }
     }
 
-    protected JSONObject fixupKeys(JSONObject json) throws JSONException {
+    protected ObjectNode fixupKeys(ObjectNode json)  {
         // TODO (mblow): generate the keys with _ to begin with
         List<String> keys = new ArrayList<>();
-        for (Iterator iter = json.keys(); iter.hasNext(); ) {
+        for (Iterator iter = json.fieldNames(); iter.hasNext(); ) {
             keys.add((String) iter.next());
         }
         for (String key : keys) {
             String newKey = key.replace('-', '_');
             if (!newKey.equals(key)) {
-                json.put(newKey, json.remove(key));
+                json.set(newKey, json.remove(key));
             }
         }
         return json;
     }
 
-    protected JSONObject processNodeStats(IHyracksClientConnection hcc, String node) throws Exception {
+    protected ObjectNode processNodeStats(IHyracksClientConnection hcc, String node) throws Exception {
         final String details = hcc.getNodeDetailsJSON(node, true, false);
         if (details == null) {
             throw new IllegalArgumentException();
         }
-        JSONObject json = new JSONObject(details);
-        int index = json.getInt("rrd-ptr") - 1;
+        ObjectNode json = (ObjectNode) om.readTree(details);
+        int index = json.get("rrd-ptr").asInt() - 1;
         json.remove("rrd-ptr");
 
         List<String> keys = new ArrayList<>();
-        for (Iterator iter = json.keys(); iter.hasNext(); ) {
+        for (Iterator iter = json.fieldNames(); iter.hasNext(); ) {
             keys.add((String) iter.next());
         }
 
-        final JSONArray gcNames = json.getJSONArray("gc-names");
-        final JSONArray gcCollectionTimes = json.getJSONArray("gc-collection-times");
-        final JSONArray gcCollectionCounts = json.getJSONArray("gc-collection-counts");
+        final ArrayNode gcNames = (ArrayNode) json.get("gc-names");
+        final ArrayNode gcCollectionTimes  = (ArrayNode) json.get("gc-collection-times");
+        final ArrayNode gcCollectionCounts = (ArrayNode) json.get("gc-collection-counts");
 
         for (String key : keys) {
             if (key.startsWith("gc-")) {
                 json.remove(key);
-            } else if (json.get(key) instanceof JSONArray) {
-                final JSONArray valueArray = json.getJSONArray(key);
+            } else if (json.get(key) instanceof ArrayNode) {
+                final ArrayNode valueArray = (ArrayNode) json.get(key);
                 // fixup an index of -1 to the final element in the array (i.e. RRD_SIZE)
                 if (index == -1) {
-                    index = valueArray.length() - 1;
+                    index = valueArray.size() - 1;
                 }
                 final Object value = valueArray.get(index);
                 json.remove(key);
-                json.put(key.replaceAll("s$",""), value);
+                json.putPOJO(key.replaceAll("s$",""), value);
             }
         }
-        List<JSONObject> gcs = new ArrayList<>();
+        List<ObjectNode> gcs = new ArrayList<>();
 
-        for (int i = 0; i < gcNames.length(); i++) {
-            JSONObject gc = new JSONObject();
-            gc.put("name", gcNames.get(i));
-            gc.put("collection-time", ((JSONArray)gcCollectionTimes.get(i)).get(index));
-            gc.put("collection-count", ((JSONArray)gcCollectionCounts.get(i)).get(index));
+        for (int i = 0; i < gcNames.size(); i++) {
+            ObjectNode gc = om.createObjectNode();
+            gc.set("name", gcNames.get(i));
+            gc.set("collection-time", ((ArrayNode)gcCollectionTimes.get(i)).get(index));
+            gc.set("collection-count", ((ArrayNode)gcCollectionCounts.get(i)).get(index));
             gcs.add(gc);
         }
-        json.put("gcs", gcs);
+        json.putPOJO("gcs", gcs);
 
         return json;
     }
 
-    private JSONObject processNodeConfig(IHyracksClientConnection hcc, String node) throws Exception {
+    private ObjectNode processNodeConfig(IHyracksClientConnection hcc, String node) throws Exception {
         String config = hcc.getNodeDetailsJSON(node, false, true);
         if (config == null) {
             throw new IllegalArgumentException();
         }
-        return new JSONObject(config);
+        return (ObjectNode) om.readTree(config);
     }
 
-    private JSONObject processNodeThreadDump(IHyracksClientConnection hcc, String node) throws Exception {
+    private ObjectNode processNodeThreadDump(IHyracksClientConnection hcc, String node) throws Exception {
         if ("cc".equals(node)) {
-            return new JSONObject();
+            return om.createObjectNode();
         }
         String dump = hcc.getThreadDump(node);
         if (dump == null) {
@@ -198,7 +205,7 @@
                     ? new IllegalStateException()
                     : new IllegalArgumentException();
         }
-        return new JSONObject(dump);
+        return (ObjectNode) om.readTree(dump);
     }
 
 }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java
index ac1a5aa..78801b8 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java
@@ -30,7 +30,7 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.MetadataTransactionContext;
 import org.apache.asterix.metadata.declared.MetadataProvider;
@@ -40,10 +40,9 @@
 import org.apache.asterix.util.FlushDatasetUtils;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.client.NodeControllerInfo;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.io.FileSplit;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 /***
  * The REST API that takes a dataverse name and a dataset name as the input
@@ -62,7 +61,8 @@
         response.setCharacterEncoding("utf-8");
         PrintWriter out = response.getWriter();
         try {
-            JSONObject jsonResponse = new JSONObject();
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode jsonResponse = om.createObjectNode();
             String dataverseName = request.getParameter("dataverseName");
             String datasetName = request.getParameter("datasetName");
             if (dataverseName == null || datasetName == null) {
@@ -94,8 +94,8 @@
                 return;
             }
             boolean temp = dataset.getDatasetDetails().isTemp();
-            FileSplit[] fileSplits =
-                    metadataProvider.splitsForDataset(mdTxnCtx, dataverseName, datasetName, datasetName, temp);
+            FileSplit[] fileSplits = metadataProvider.splitsForDataset(mdTxnCtx, dataverseName, datasetName,
+                    datasetName, temp);
             ARecordType recordType = (ARecordType) metadataProvider.findType(dataset.getItemTypeDataverseName(),
                     dataset.getItemTypeName());
             List<List<String>> primaryKeys = DatasetUtils.getPartitioningKeys(dataset);
@@ -127,24 +127,25 @@
         }
     }
 
-    private void formResponseObject(JSONObject jsonResponse, FileSplit[] fileSplits, ARecordType recordType,
+    private void formResponseObject(ObjectNode jsonResponse, FileSplit[] fileSplits, ARecordType recordType,
             String primaryKeys, boolean temp, Map<String, NodeControllerInfo> nodeMap) throws Exception {
-        JSONArray partititons = new JSONArray();
+        ObjectMapper om = new ObjectMapper();
+        ArrayNode partititons = om.createArrayNode();
         // Whether the dataset is temp or not
         jsonResponse.put("temp", temp);
         // Adds a primary key.
         jsonResponse.put("keys", primaryKeys);
         // Adds record type.
-        jsonResponse.put("type", recordType.toJSON());
+        jsonResponse.set("type", recordType.toJSON());
         // Generates file partitions.
         for (FileSplit split : fileSplits) {
             String ipAddress = nodeMap.get(split.getNodeName()).getNetworkAddress().getAddress().toString();
             String path = split.getPath();
             FilePartition partition = new FilePartition(ipAddress, path);
-            partititons.put(partition.toJSONObject());
+            partititons.add(partition.toObjectNode());
         }
         // Generates the response object which contains the splits.
-        jsonResponse.put("splits", partititons);
+        jsonResponse.set("splits", partititons);
     }
 }
 
@@ -170,8 +171,9 @@
         return ipAddress + ":" + path;
     }
 
-    public JSONObject toJSONObject() throws JSONException {
-        JSONObject partition = new JSONObject();
+    public ObjectNode toObjectNode() {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode partition = om.createObjectNode();
         partition.put("ip", ipAddress);
         partition.put("path", path);
         return partition;
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/DiagnosticsAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/DiagnosticsAPIServlet.java
index c709ab5..4416d5c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/DiagnosticsAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/DiagnosticsAPIServlet.java
@@ -32,14 +32,14 @@
 import java.util.concurrent.Future;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
 import org.apache.asterix.runtime.util.AppContextInfo;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class DiagnosticsAPIServlet extends ClusterNodeDetailsAPIServlet {
     private static final long serialVersionUID = 1L;
@@ -50,14 +50,16 @@
         response.setContentType("application/json");
         response.setCharacterEncoding("utf-8");
         PrintWriter responseWriter = response.getWriter();
-        JSONObject json;
+        ObjectNode json;
+        ObjectMapper om = new ObjectMapper();
+        om.enable(SerializationFeature.INDENT_OUTPUT);
         try {
             if (request.getPathInfo() != null) {
                 throw new IllegalArgumentException();
             }
             json = getClusterDiagnosticsJSON();
             response.setStatus(HttpServletResponse.SC_OK);
-            responseWriter.write(json.toString(4));
+            responseWriter.write(om.writerWithDefaultPrettyPrinter().writeValueAsString(json));
         } catch (IllegalStateException e) { // NOSONAR - exception not logged or rethrown
             response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
         } catch (IllegalArgumentException e) { // NOSONAR - exception not logged or rethrown
@@ -69,47 +71,46 @@
         responseWriter.flush();
     }
 
-    private JSONObject getClusterDiagnosticsJSON() throws Exception {
+    private ObjectNode getClusterDiagnosticsJSON() throws Exception {
+        ObjectMapper om = new ObjectMapper();
         final ServletContext context = getServletContext();
-        IHyracksClientConnection hcc =
-                (IHyracksClientConnection) context.getAttribute(HYRACKS_CONNECTION_ATTR);
+        IHyracksClientConnection hcc = (IHyracksClientConnection) context.getAttribute(HYRACKS_CONNECTION_ATTR);
         ExecutorService executor = (ExecutorService) context.getAttribute(ServletConstants.EXECUTOR_SERVICE);
 
-        Map<String, Future<JSONObject>> ccFutureData = new HashMap<>();
-        ccFutureData.put("threaddump", executor.submit(() -> fixupKeys(new JSONObject(hcc.getThreadDump(null)))));
-        ccFutureData.put("config", executor.submit(() ->
-                fixupKeys(new JSONObject(hcc.getNodeDetailsJSON(null, false, true)))));
-        ccFutureData.put("stats", executor.submit(() ->
-                fixupKeys(new JSONObject(hcc.getNodeDetailsJSON(null, true, false)))));
+        Map<String, Future<ObjectNode>> ccFutureData = new HashMap<>();
+        ccFutureData.put("threaddump",
+                executor.submit(() -> fixupKeys((ObjectNode) om.readTree(hcc.getThreadDump(null)))));
+        ccFutureData.put("config",
+                executor.submit(() -> fixupKeys((ObjectNode) om.readTree(hcc.getNodeDetailsJSON(null, false, true)))));
+        ccFutureData.put("stats",
+                executor.submit(() -> fixupKeys((ObjectNode) om.readTree(hcc.getNodeDetailsJSON(null, true, false)))));
 
-        Map<String, Map<String, Future<JSONObject>>> ncDataMap = new HashMap<>();
+        Map<String, Map<String, Future<ObjectNode>>> ncDataMap = new HashMap<>();
         for (String nc : AppContextInfo.INSTANCE.getMetadataProperties().getNodeNames()) {
-            Map<String, Future<JSONObject>> ncData = new HashMap<>();
-            ncData.put("threaddump", executor.submit(() ->
-                    fixupKeys(new JSONObject(hcc.getThreadDump(nc)))));
-            ncData.put("config", executor.submit(() ->
-                    fixupKeys(new JSONObject(hcc.getNodeDetailsJSON(nc, false, true)))));
-            ncData.put("stats", executor.submit(() ->
-                    fixupKeys(processNodeStats(hcc, nc))));
+            Map<String, Future<ObjectNode>> ncData = new HashMap<>();
+            ncData.put("threaddump", executor.submit(() -> fixupKeys((ObjectNode) om.readTree(hcc.getThreadDump(nc)))));
+            ncData.put("config", executor
+                    .submit(() -> fixupKeys((ObjectNode) om.readTree(hcc.getNodeDetailsJSON(nc, false, true)))));
+            ncData.put("stats", executor.submit(() -> fixupKeys(processNodeStats(hcc, nc))));
             ncDataMap.put(nc, ncData);
         }
-        JSONObject result = new JSONObject();
-        result.put("cc", resolveFutures(ccFutureData));
+        ObjectNode result = om.createObjectNode();
+        result.putPOJO("cc", resolveFutures(ccFutureData));
         List<Map<String, ?>> ncList = new ArrayList<>();
-        for (Map.Entry<String, Map<String, Future<JSONObject>>> entry : ncDataMap.entrySet()) {
+        for (Map.Entry<String, Map<String, Future<ObjectNode>>> entry : ncDataMap.entrySet()) {
             final Map<String, Object> ncMap = resolveFutures(entry.getValue());
             ncMap.put("node_id", entry.getKey());
             ncList.add(ncMap);
         }
-        result.put("ncs", ncList);
-        result.put("date", new Date());
+        result.putPOJO("ncs", ncList);
+        result.putPOJO("date", new Date());
         return result;
     }
 
-    private Map<String, Object> resolveFutures(Map<String, Future<JSONObject>> futureMap)
+    private Map<String, Object> resolveFutures(Map<String, Future<ObjectNode>> futureMap)
             throws ExecutionException, InterruptedException {
         Map<String, Object> result = new HashMap<>();
-        for (Map.Entry<String, Future<JSONObject>> entry : futureMap.entrySet()) {
+        for (Map.Entry<String, Future<ObjectNode>> entry : futureMap.entrySet()) {
             result.put(entry.getKey(), entry.getValue().get());
         }
         return result;
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryResultAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryResultAPIServlet.java
index 9994bc7..b250690 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryResultAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryResultAPIServlet.java
@@ -31,6 +31,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.app.result.ResultReader;
 import org.apache.asterix.app.result.ResultUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
@@ -42,12 +43,11 @@
 import org.apache.hyracks.api.dataset.ResultSetId;
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.client.dataset.HyracksDataset;
-import org.json.JSONArray;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class QueryResultAPIServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
-
     private static final Logger LOGGER = Logger.getLogger(QueryResultAPIServlet.class.getName());
 
     @Override
@@ -83,10 +83,11 @@
                     context.setAttribute(HYRACKS_DATASET_ATTR, hds);
                 }
             }
-            JSONObject handleObj = new JSONObject(strHandle);
-            JSONArray handle = handleObj.getJSONArray("handle");
-            JobId jobId = new JobId(handle.getLong(0));
-            ResultSetId rsId = new ResultSetId(handle.getLong(1));
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode handleObj = (ObjectNode) om.readTree(strHandle);
+            ArrayNode handle = (ArrayNode) handleObj.get("handle");
+            JobId jobId = new JobId(handle.get(0).asLong());
+            ResultSetId rsId = new ResultSetId(handle.get(1).asLong());
 
             ResultReader resultReader = new ResultReader(hds);
             resultReader.open(jobId, rsId);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java
index 9da518a..a0454fd 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java
@@ -37,6 +37,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -293,6 +294,7 @@
     private static SessionConfig createSessionConfig(RequestParameters param, PrintWriter resultWriter) {
         SessionConfig.ResultDecorator resultPrefix = new SessionConfig.ResultDecorator() {
             int resultNo = -1;
+
             @Override
             public AlgebricksAppendable append(AlgebricksAppendable app) throws AlgebricksException {
                 app.append("\t\"");
@@ -306,16 +308,24 @@
             }
         };
 
+
         SessionConfig.ResultDecorator resultPostfix = (AlgebricksAppendable app) -> app.append("\t,\n");
 
-        SessionConfig.ResultDecorator handlePrefix = (AlgebricksAppendable app) -> app.append("\t\"").append
-                (ResultFields.HANDLE.str()).append("\": ");
+        SessionConfig.ResultDecorator handlePrefix = new SessionConfig.ResultDecorator() {
+            @Override
+            public AlgebricksAppendable append(AlgebricksAppendable app) throws AlgebricksException {
+                app.append("\t\"");
+                app.append(ResultFields.HANDLE.str());
+                app.append("\": ");
+                return app;
+            }
+        };
 
         SessionConfig.ResultDecorator handlePostfix = (AlgebricksAppendable app) -> app.append(",\n");
 
         SessionConfig.OutputFormat format = getFormat(param.format);
-        SessionConfig sessionConfig = new SessionConfig(resultWriter, format, resultPrefix, resultPostfix,
-                handlePrefix, handlePostfix);
+        SessionConfig sessionConfig = new SessionConfig(resultWriter, format, resultPrefix, resultPostfix, handlePrefix,
+                handlePostfix);
         sessionConfig.set(SessionConfig.FORMAT_WRAPPER_ARRAY, true);
         sessionConfig.set(SessionConfig.FORMAT_INDENT_JSON, param.pretty);
         sessionConfig.set(SessionConfig.FORMAT_QUOTE_RECORD,
@@ -376,7 +386,7 @@
         printField(pw, ResultFields.STATUS.str(), rs.str());
     }
 
-    private static void printError(PrintWriter pw, Throwable e) {
+    private static void printError(PrintWriter pw, Throwable e) throws JsonProcessingException {
         Throwable rootCause = ResultUtil.getRootCause(e);
         if (rootCause == null) {
             rootCause = e;
@@ -386,16 +396,10 @@
         pw.print(ResultFields.ERRORS.str());
         pw.print("\": [{ \n");
         printField(pw, ErrorField.CODE.str(), "1");
+
         final String msg = rootCause.getMessage();
         printField(pw, ErrorField.MSG.str(), JSONUtil.escape(msg != null ? msg : rootCause.getClass().getSimpleName()),
                 addStack);
-        if (addStack) {
-            StringWriter sw = new StringWriter();
-            PrintWriter stackWriter = new PrintWriter(sw);
-            LOGGER.info(stackWriter.toString());
-            stackWriter.close();
-            printField(pw, ErrorField.STACK.str(), JSONUtil.escape(sw.toString()), false);
-        }
         pw.print("\t}],\n");
     }
 
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java
index 9555e11..6d1b1b2 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java
@@ -29,14 +29,15 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.app.result.ResultReader;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.dataset.IHyracksDataset;
 import org.apache.hyracks.api.dataset.ResultSetId;
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.client.dataset.HyracksDataset;
-import org.json.JSONArray;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class QueryStatusAPIServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
@@ -61,10 +62,11 @@
                     context.setAttribute(HYRACKS_DATASET_ATTR, hds);
                 }
             }
-            JSONObject handleObj = new JSONObject(strHandle);
-            JSONArray handle = handleObj.getJSONArray("handle");
-            JobId jobId = new JobId(handle.getLong(0));
-            ResultSetId rsId = new ResultSetId(handle.getLong(1));
+            ObjectMapper om = new ObjectMapper();
+            JsonNode handleObj = om.readTree(strHandle);
+            JsonNode handle = handleObj.get("handle");
+            JobId jobId = new JobId(handle.get(0).asLong());
+            ResultSetId rsId = new ResultSetId(handle.get(1).asLong());
 
             /* TODO(madhusudancs): We need to find a way to LOSSLESS_JSON serialize default format obtained from
              * metadataProvider in the AQLTranslator and store it as part of the result handle.
@@ -72,7 +74,7 @@
             ResultReader resultReader = new ResultReader(hds);
             resultReader.open(jobId, rsId);
 
-            JSONObject jsonResponse = new JSONObject();
+            ObjectNode jsonResponse = om.createObjectNode();
             String status;
             switch (resultReader.getStatus()) {
                 case RUNNING:
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryWebInterfaceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryWebInterfaceServlet.java
index 383d8fd..d3e5556 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryWebInterfaceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryWebInterfaceServlet.java
@@ -30,12 +30,13 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.asterix.common.config.ExternalProperties;
 import org.apache.asterix.runtime.util.AppContextInfo;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.codehaus.jettison.json.JSONObject;
 
 public class QueryWebInterfaceServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
@@ -110,7 +111,8 @@
         response.setCharacterEncoding("utf-8");
         response.setContentType("application/json");
         ExternalProperties externalProperties = AppContextInfo.INSTANCE.getExternalProperties();
-        JSONObject obj = new JSONObject();
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode obj = om.createObjectNode();
         try {
             PrintWriter out = response.getWriter();
             obj.put("api_port", String.valueOf(externalProperties.getAPIServerPort()));
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
index 4a06590..dd030b0 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
@@ -33,6 +33,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.app.result.ResultReader;
 import org.apache.asterix.app.result.ResultUtil;
 import org.apache.asterix.app.translator.QueryTranslator;
@@ -53,7 +54,7 @@
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.dataset.IHyracksDataset;
 import org.apache.hyracks.client.dataset.HyracksDataset;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 abstract class RESTAPIServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
@@ -211,9 +212,9 @@
         } catch (AsterixException | TokenMgrError | org.apache.asterix.aqlplus.parser.TokenMgrError pe) {
             GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, pe.getMessage(), pe);
             String errorMessage = ResultUtil.buildParseExceptionMessage(pe, query);
-            JSONObject errorResp =
+            ObjectNode errorResp =
                     ResultUtil.getErrorResponse(2, errorMessage, "", ResultUtil.extractFullStackTrace(pe));
-            sessionConfig.out().write(errorResp.toString());
+            sessionConfig.out().write(new ObjectMapper().writeValueAsString(errorResp));
             response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
         } catch (Exception e) {
             GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, e.getMessage(), e);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java
index d99b379..d07166e 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java
@@ -31,11 +31,13 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.runtime.util.ClusterStateManager;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.json.JSONArray;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ShutdownAPIServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
@@ -62,25 +64,25 @@
         response.setContentType("application/json");
         response.setCharacterEncoding("utf-8");
         response.setStatus(HttpServletResponse.SC_ACCEPTED);
-        JSONObject jsonObject = new JSONObject();
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode jsonObject = om.createObjectNode();
         try {
             jsonObject.put("status", "SHUTTING_DOWN");
-            jsonObject.put("date", new Date());
-            JSONObject clusterState = ClusterStateManager.INSTANCE.getClusterStateDescription();
-            JSONArray ncs = clusterState.getJSONArray("ncs");
-            for (int i = 0; i < ncs.length(); i++) {
-                JSONObject nc = ncs.getJSONObject(i);
-                String node = nc.getString(NODE_ID_KEY);
-                JSONObject details = new JSONObject(hcc.getNodeDetailsJSON(node, false, true));
-                nc.put(PID, details.get(PID));
-                if (details.has(INI) && details.getJSONObject(INI).has(NCSERVICE_PID)) {
-                    nc.put(NCSERVICE_PID, details.getJSONObject(INI).getInt(NCSERVICE_PID));
+            jsonObject.putPOJO("date", new Date());
+            ObjectNode clusterState = ClusterStateManager.INSTANCE.getClusterStateDescription();
+            ArrayNode ncs = (ArrayNode) clusterState.get("ncs");
+            for (int i = 0; i < ncs.size(); i++) {
+                ObjectNode nc = (ObjectNode) ncs.get(i);
+                String node = nc.get(NODE_ID_KEY).asText();
+                ObjectNode details = (ObjectNode) om.readTree(hcc.getNodeDetailsJSON(node, false, true));
+                nc.set(PID, details.get(PID));
+                if (details.has(INI) && details.get(INI).has(NCSERVICE_PID)) {
+                    nc.put(NCSERVICE_PID, details.get(INI).get(NCSERVICE_PID).asInt());
                 }
             }
-            jsonObject.put("cluster", clusterState);
-
+            jsonObject.set("cluster", clusterState);
             final PrintWriter writer = response.getWriter();
-            writer.print(jsonObject.toString(4));
+            writer.print(om.writeValueAsString(jsonObject));
             writer.close();
         } catch (Exception e) {
             GlobalConfig.ASTERIX_LOGGER.log(Level.INFO, "Exception writing response", e);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
index c1ce344..398a355 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
@@ -27,8 +27,9 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.asterix.runtime.util.AppContextInfo;
-import org.json.JSONObject;
 
 import static org.apache.asterix.api.http.servlet.ServletConstants.ASTERIX_BUILD_PROP_ATTR;
 
@@ -40,7 +41,11 @@
         ServletContext context = getServletContext();
         AppContextInfo props = (AppContextInfo) context.getAttribute(ASTERIX_BUILD_PROP_ATTR);
         Map<String, String> buildProperties = props.getBuildProperties().getAllProps();
-        JSONObject responseObject = new JSONObject(buildProperties);
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode responseObject = om.createObjectNode();
+        for (Map.Entry<String, String> e : buildProperties.entrySet()) {
+            responseObject.put(e.getKey(), e.getValue());
+        }
         response.setCharacterEncoding("utf-8");
         PrintWriter responseWriter = response.getWriter();
         responseWriter.write(responseObject.toString());
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java
index 22034c3..5465fbd 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java
@@ -24,6 +24,9 @@
 import java.io.StringWriter;
 import java.nio.ByteBuffer;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.asterix.common.utils.JSONUtil;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.translator.IStatementExecutor.Stats;
@@ -126,13 +129,20 @@
         if (conf.is(SessionConfig.FORMAT_HTML)) {
             conf.out().println("</pre>");
         }
+        conf.out().flush();
     }
 
-    private void printRecord(String result) {
+    private void displayRecord(String result) throws HyracksDataException {
+        ObjectMapper om = new ObjectMapper();
+        om.enable(SerializationFeature.INDENT_OUTPUT);
         String record = result;
         if (indentJSON) {
             // TODO(tillw): this is inefficient - do this during record generation
-            record = JSONUtil.indent(record, 2);
+            try {
+                record = om.writerWithDefaultPrettyPrinter().writeValueAsString(om.readValue(result, ObjectNode.class));
+            } catch (IOException e) {
+                throw new HyracksDataException(e);
+            }
         }
         if (conf.fmt() == SessionConfig.OutputFormat.CSV) {
             // TODO(tillw): this is inefficient as well
@@ -152,7 +162,7 @@
         printPrefix();
         // TODO(tillw) evil hack
         quoteRecord = true;
-        printRecord(record);
+        displayRecord(record);
         printPostfix();
     }
 
@@ -179,7 +189,11 @@
                     conf.out().print(", ");
                 }
                 notFirst = true;
-                printRecord(result);
+                try {
+                    displayRecord(result);
+                } catch (IOException e) {
+                    throw new HyracksDataException(e);
+                }
             }
             frameBuffer.clear();
         }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultUtil.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultUtil.java
index 595c6ab..80b8ffe 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultUtil.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultUtil.java
@@ -33,6 +33,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.api.http.servlet.APIServlet;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.translator.IStatementExecutor.Stats;
@@ -42,9 +43,9 @@
 import org.apache.hyracks.algebricks.core.algebra.prettyprint.AlgebricksAppendable;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.log4j.Logger;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ResultUtil {
     private static final Logger LOGGER = Logger.getLogger(ResultUtil.class.getName());
@@ -94,25 +95,21 @@
         }
     }
 
-    public static JSONObject getErrorResponse(int errorCode, String errorMessage, String errorSummary,
+    public static ObjectNode getErrorResponse(int errorCode, String errorMessage, String errorSummary,
             String errorStackTrace) {
-        JSONObject errorResp = new JSONObject();
-        JSONArray errorArray = new JSONArray();
-        errorArray.put(errorCode);
-        errorArray.put(errorMessage);
-        try {
-            errorResp.put("error-code", errorArray);
-            if (!"".equals(errorSummary)) {
-                errorResp.put("summary", errorSummary);
-            } else {
-                //parse exception
-                errorResp.put("summary", errorMessage);
-            }
-            errorResp.put("stacktrace", errorStackTrace);
-        } catch (JSONException e) {
-            LOGGER.warn("Failed to build the result's JSON object", e);
-            // TODO(madhusudancs): Figure out what to do when JSONException occurs while building the results.
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode errorResp = om.createObjectNode();
+        ArrayNode errorArray = om.createArrayNode();
+        errorArray.add(errorCode);
+        errorArray.add(errorMessage);
+        errorResp.set("error-code", errorArray);
+        if (!"".equals(errorSummary)) {
+            errorResp.put("summary", errorSummary);
+        } else {
+            //parse exception
+            errorResp.put("summary", errorMessage);
         }
+        errorResp.put("stacktrace", errorStackTrace);
         return errorResp;
     }
 
@@ -141,7 +138,7 @@
             errorCode = 4;
         }
 
-        JSONObject errorResp = ResultUtil.getErrorResponse(errorCode, extractErrorMessage(e), extractErrorSummary(e),
+        ObjectNode errorResp = ResultUtil.getErrorResponse(errorCode, extractErrorMessage(e), extractErrorSummary(e),
                 extractFullStackTrace(e));
         out.write(errorResp.toString());
     }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index 906525c..593adb2 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -40,6 +40,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.active.ActiveJobNotificationHandler;
 import org.apache.asterix.active.ActivityState;
 import org.apache.asterix.active.EntityId;
@@ -205,6 +206,9 @@
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.api.job.JobSpecification;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import com.google.common.collect.Lists;
 
@@ -2589,15 +2593,15 @@
     private void handleQueryResult(MetadataProvider metadataProvider, IHyracksClientConnection hcc,
             IHyracksDataset hdc, JobSpecification jobSpec, ResultDelivery resultDelivery, Stats stats)
             throws Exception {
-        if (GlobalConfig.ASTERIX_LOGGER.isLoggable(Level.FINE)) {
-            GlobalConfig.ASTERIX_LOGGER.fine(jobSpec.toJSON().toString(1));
-        }
         JobId jobId = JobUtils.runJob(hcc, jobSpec, false);
 
+        ResultHandle hand;
         switch (resultDelivery) {
             case ASYNC:
-                ResultUtil.printResultHandle(new ResultHandle(jobId, metadataProvider.getResultSetId()), sessionConfig);
+                hand = new ResultHandle(jobId,metadataProvider.getResultSetId());
+                ResultUtil.printResultHandle(hand,sessionConfig);
                 hcc.waitForCompletion(jobId);
+                sessionConfig.out().flush();
                 break;
             case IMMEDIATE:
                 hcc.waitForCompletion(jobId);
@@ -2607,7 +2611,9 @@
                 break;
             case DEFERRED:
                 hcc.waitForCompletion(jobId);
-                ResultUtil.printResultHandle(new ResultHandle(jobId, metadataProvider.getResultSetId()), sessionConfig);
+                hand = new ResultHandle(jobId,metadataProvider.getResultSetId());
+                ResultUtil.printResultHandle(hand,sessionConfig);
+                sessionConfig.out().flush();
                 break;
             default:
                 break;
@@ -3237,4 +3243,4 @@
         }
         return recordNameTypesMap;
     }
-}
\ No newline at end of file
+}
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/ConnectorAPIServletTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/ConnectorAPIServletTest.java
index fdcbad5..48d1c1c 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/ConnectorAPIServletTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/ConnectorAPIServletTest.java
@@ -36,6 +36,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.MetadataTransactionContext;
 import org.apache.asterix.metadata.declared.MetadataProvider;
@@ -48,10 +49,10 @@
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.client.NodeControllerInfo;
 import org.apache.hyracks.api.comm.NetworkAddress;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.io.FileSplit;
 import org.apache.hyracks.api.io.ManagedFileSplit;
-import org.json.JSONArray;
-import org.json.JSONObject;
 import org.json.JSONTokener;
 import org.junit.Assert;
 import org.junit.Test;
@@ -97,22 +98,21 @@
         servlet.doGet(mockRequest, mockResponse);
 
         // Constructs the actual response.
-        JSONTokener tokener = new JSONTokener(
-                new InputStreamReader(new ByteArrayInputStream(outputStream.toByteArray())));
-        JSONObject actualResponse = new JSONObject(tokener);
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode actualResponse = (ObjectNode) om.readTree(outputStream.toString());
 
         // Checks the temp-or-not, primary key, data type of the dataset.
-        boolean temp = actualResponse.getBoolean("temp");
+        boolean temp = actualResponse.get("temp").asBoolean();
         Assert.assertFalse(temp);
-        String primaryKey = actualResponse.getString("keys");
+        String primaryKey = actualResponse.get("keys").asText();
         Assert.assertEquals("DataverseName,DatasetName", primaryKey);
         ARecordType recordType = (ARecordType) JSONDeserializerForTypes
-                .convertFromJSON((JSONObject) actualResponse.get("type"));
+                .convertFromJSON((ObjectNode) actualResponse.get("type"));
         Assert.assertEquals(getMetadataRecordType("Metadata", "Dataset"), recordType);
 
         // Checks the correctness of results.
-        JSONArray splits = actualResponse.getJSONArray("splits");
-        String path = ((JSONObject) splits.get(0)).getString("path");
+        ArrayNode splits = (ArrayNode) actualResponse.get("splits");
+        String path = (splits.get(0)).get("path").asText();
         Assert.assertTrue(path.endsWith("Metadata/Dataset_idx_Dataset"));
 
         // Tears down the asterixdb cluster.
@@ -122,7 +122,8 @@
     @Test
     public void testFormResponseObject() throws Exception {
         ConnectorAPIServlet servlet = new ConnectorAPIServlet();
-        JSONObject actualResponse = new JSONObject();
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode actualResponse = om.createObjectNode();
         FileSplit[] splits = new FileSplit[2];
         splits[0] = new ManagedFileSplit("asterix_nc1", "foo1");
         splits[1] = new ManagedFileSplit("asterix_nc2", "foo2");
@@ -142,24 +143,24 @@
         // Calls ConnectorAPIServlet.formResponseObject.
         nodeMap.put("asterix_nc1", mockInfo1);
         nodeMap.put("asterix_nc2", mockInfo2);
-        PA.invokeMethod(servlet, "formResponseObject(" + JSONObject.class.getName() + ", " + FileSplit.class.getName()
+        PA.invokeMethod(servlet, "formResponseObject(" + ObjectNode.class.getName() + ", " + FileSplit.class.getName()
                 + "[], " + ARecordType.class.getName() + ", " + String.class.getName() + ", boolean, " + Map.class
                         .getName() + ")", actualResponse, splits, recordType, primaryKey, true, nodeMap);
         // Constructs expected response.
-        JSONObject expectedResponse = new JSONObject();
+        ObjectNode expectedResponse = om.createObjectNode();
         expectedResponse.put("temp", true);
         expectedResponse.put("keys", primaryKey);
-        expectedResponse.put("type", recordType.toJSON());
-        JSONArray splitsArray = new JSONArray();
-        JSONObject element1 = new JSONObject();
+        expectedResponse.set("type", recordType.toJSON());
+        ArrayNode splitsArray = om.createArrayNode();
+        ObjectNode element1 = om.createObjectNode();
         element1.put("ip", "127.0.0.1");
         element1.put("path", splits[0].getPath());
-        JSONObject element2 = new JSONObject();
+        ObjectNode element2 = om.createObjectNode();
         element2.put("ip", "127.0.0.2");
         element2.put("path", splits[1].getPath());
-        splitsArray.put(element1);
-        splitsArray.put(element2);
-        expectedResponse.put("splits", splitsArray);
+        splitsArray.add(element1);
+        splitsArray.add(element2);
+        expectedResponse.set("splits", splitsArray);
 
         // Checks results.
         Assert.assertEquals(actualResponse.toString(), expectedResponse.toString());
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
index 2209fc5..da0ec0c 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
@@ -37,12 +37,12 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.config.BuildProperties;
 import org.apache.asterix.runtime.util.AppContextInfo;
 import org.apache.asterix.test.runtime.SqlppExecutionTest;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.json.JSONObject;
-import org.json.JSONTokener;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -103,10 +103,13 @@
         servlet.doGet(mockRequest, mockResponse);
 
         // Constructs the actual response.
-        JSONTokener tokener = new JSONTokener(
-                new InputStreamReader(new ByteArrayInputStream(outputStream.toByteArray())));
-        JSONObject actualResponse = new JSONObject(tokener);
-        JSONObject expectedResponse = new JSONObject(propMap);
+
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode actualResponse = (ObjectNode) om.readTree(outputStream.toByteArray());
+        ObjectNode expectedResponse = om.createObjectNode();
+        for (Map.Entry<String, String> e : propMap.entrySet()) {
+            expectedResponse.put(e.getKey(), e.getValue());
+        }
 
         // Checks the response contains all the expected keys.
         Assert.assertEquals(actualResponse.toString(), expectedResponse.toString());
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/types/any-object/any-object.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/types/any-object/any-object.2.query.sqlpp
index 91a980e..afaa5b1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/types/any-object/any-object.2.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/types/any-object/any-object.2.query.sqlpp
@@ -17,6 +17,4 @@
  * under the License.
  */
 
-select element x
-from Metadata.Datatype as x
-order by x.DataverseName, x.DatatypeName;
+select element x from Metadata.Datatype as x;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm
index 15b1baa..746b75d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm
@@ -1,129 +1,162 @@
 {
-    "cc": {
-        "configUri": "http://127.0.0.1:19002/admin/cluster/cc/config",
-        "statsUri": "http://127.0.0.1:19002/admin/cluster/cc/stats",
-        "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
+  "cc" : {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/cc/config",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/cc/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
+  },
+  "config" : {
+    "api.port" : 19002,
+    "cluster.partitions" : {
+      "0" : {
+        "partitionId" : 0,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 0
+      },
+      "1" : {
+        "partitionId" : 1,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 1
+      },
+      "2" : {
+        "partitionId" : 2,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 0
+      },
+      "3" : {
+        "partitionId" : 3,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 1
+      }
     },
-    "config": {
-        "api.port": 19002,
-        "cluster.partitions": {
-            "0": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-            "1": "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc1",
-            "2": "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-            "3": "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
-        },
-        "compiler.framesize": 32768,
-        "compiler.groupmemory": 163840,
-        "compiler.joinmemory": 262144,
-        "compiler.parallelism": 0,
-        "compiler.pregelix.home": "~/pregelix",
-        "compiler.sortmemory": 327680,
-        "core.dump.paths": {},
-        "feed.central.manager.port": 4500,
-        "feed.max.threshold.period": 5,
-        "feed.memory.available.wait.timeout": 10,
-        "feed.memory.global.budget": 67108864,
-        "feed.pending.work.threshold": 50,
-        "feed.port": 19003,
-        "instance.name": null,
-        "log.level": "INFO",
-        "max.wait.active.cluster": 60,
-        "metadata.callback.port": 0,
-        "metadata.node": "asterix_nc1",
-        "metadata.partition": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-        "metadata.port": 0,
-        "metadata.registration.timeout.secs": 60,
-        "node.partitions": {
-            "asterix_nc1": [
-                "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-                "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc1"
-            ],
-            "asterix_nc2": [
-                "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-                "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
-            ]
-        },
-        "node.stores": {
-            "asterix_nc1": [
-                "iodevice0",
-                "iodevice1"
-            ],
-            "asterix_nc2": [
-                "iodevice0",
-                "iodevice1"
-            ]
-        },
-        "plot.activate": false,
-        "storage.buffercache.maxopenfiles": 2147483647,
-        "storage.buffercache.pagesize": 32768,
-        "storage.buffercache.size": 50331648,
-        "storage.lsm.bloomfilter.falsepositiverate": 0.01,
-        "storage.memorycomponent.globalbudget": 536870912,
-        "storage.memorycomponent.numcomponents": 2,
-        "storage.memorycomponent.numpages": 8,
-        "storage.memorycomponent.pagesize": 131072,
-        "storage.metadata.memorycomponent.numpages": 256,
-        "transaction.log.dirs": {
-            "asterix_nc1": "target/txnLogDir/asterix_nc1",
-            "asterix_nc2": "target/txnLogDir/asterix_nc2"
-        },
-        "txn.commitprofiler.reportinterval": 5,
-        "txn.job.recovery.memorysize": 67108864,
-        "txn.lock.escalationthreshold": 1000,
-        "txn.lock.shrinktimer": 5000,
-        "txn.lock.timeout.sweepthreshold": 10000,
-        "txn.lock.timeout.waitthreshold": 60000,
-        "txn.log.buffer.numpages": 8,
-        "txn.log.buffer.pagesize": 131072,
-        "txn.log.checkpoint.history": 0,
-        "txn.log.checkpoint.lsnthreshold": 67108864,
-        "txn.log.checkpoint.pollfrequency": 120,
-        "txn.log.partitionsize": 268435456,
-        "web.port": 19001,
-        "web.queryinterface.port": 19006,
-        "web.secondary.port": 19005
+    "compiler.framesize" : 32768,
+    "compiler.groupmemory" : 163840,
+    "compiler.joinmemory" : 262144,
+    "compiler.parallelism" : 0,
+    "compiler.pregelix.home" : "~/pregelix",
+    "compiler.sortmemory" : 327680,
+    "core.dump.paths" : { },
+    "feed.central.manager.port" : 4500,
+    "feed.max.threshold.period" : 5,
+    "feed.memory.available.wait.timeout" : 10,
+    "feed.memory.global.budget" : 67108864,
+    "feed.pending.work.threshold" : 50,
+    "feed.port" : 19003,
+    "instance.name" : null,
+    "log.level" : "INFO",
+    "max.wait.active.cluster" : 60,
+    "metadata.callback.port" : 0,
+    "metadata.node" : "asterix_nc1",
+    "metadata.partition" : {
+      "partitionId" : 0,
+      "nodeId" : "asterix_nc1",
+      "activeNodeId" : "asterix_nc1",
+      "active" : true,
+      "iodeviceNum" : 0
     },
-    "diagnosticsUri": "http://127.0.0.1:19002/admin/diagnostics",
-    "fullShutdownUri": "http://127.0.0.1:19002/admin/shutdown?all=true",
-    "metadata_node": "asterix_nc1",
-    "ncs": [
-        {
-            "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
-            "node_id": "asterix_nc1",
-            "partitions": [
-                {
-                    "active": true,
-                    "partition_id": "partition_0"
-                },
-                {
-                    "active": true,
-                    "partition_id": "partition_1"
-                }
-            ],
-            "state": "ACTIVE",
-            "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
-            "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
-        },
-        {
-            "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
-            "node_id": "asterix_nc2",
-            "partitions": [
-                {
-                    "active": true,
-                    "partition_id": "partition_2"
-                },
-                {
-                    "active": true,
-                    "partition_id": "partition_3"
-                }
-            ],
-            "state": "ACTIVE",
-            "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
-            "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
-        }
-    ],
-    "replicationUri": "http://127.0.0.1:19002/admin/cluster/replication",
-    "shutdownUri": "http://127.0.0.1:19002/admin/shutdown",
-    "state": "ACTIVE",
-    "versionUri": "http://127.0.0.1:19002/admin/version"
+    "metadata.port" : 0,
+    "metadata.registration.timeout.secs" : 60,
+    "node.partitions" : {
+      "asterix_nc1" : [ {
+        "partitionId" : 0,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 0
+      }, {
+        "partitionId" : 1,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 1
+      } ],
+      "asterix_nc2" : [ {
+        "partitionId" : 2,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 0
+      }, {
+        "partitionId" : 3,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 1
+      } ]
+    },
+    "node.stores" : {
+      "asterix_nc1" : [ "iodevice0", "iodevice1" ],
+      "asterix_nc2" : [ "iodevice0", "iodevice1" ]
+    },
+    "plot.activate" : false,
+    "storage.buffercache.maxopenfiles" : 2147483647,
+    "storage.buffercache.pagesize" : 32768,
+    "storage.buffercache.size" : 50331648,
+    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
+    "storage.memorycomponent.globalbudget" : 536870912,
+    "storage.memorycomponent.numcomponents" : 2,
+    "storage.memorycomponent.numpages" : 8,
+    "storage.memorycomponent.pagesize" : 131072,
+    "storage.metadata.memorycomponent.numpages" : 256,
+    "transaction.log.dirs" : {
+      "asterix_nc1" : "target/txnLogDir/asterix_nc1",
+      "asterix_nc2" : "target/txnLogDir/asterix_nc2"
+    },
+    "txn.commitprofiler.reportinterval" : 5,
+    "txn.job.recovery.memorysize" : 67108864,
+    "txn.lock.escalationthreshold" : 1000,
+    "txn.lock.shrinktimer" : 5000,
+    "txn.lock.timeout.sweepthreshold" : 10000,
+    "txn.lock.timeout.waitthreshold" : 60000,
+    "txn.log.buffer.numpages" : 8,
+    "txn.log.buffer.pagesize" : 131072,
+    "txn.log.checkpoint.history" : 0,
+    "txn.log.checkpoint.lsnthreshold" : 67108864,
+    "txn.log.checkpoint.pollfrequency" : 120,
+    "txn.log.partitionsize" : 268435456,
+    "web.port" : 19001,
+    "web.queryinterface.port" : 19006,
+    "web.secondary.port" : 19005
+  },
+  "diagnosticsUri" : "http://127.0.0.1:19002/admin/diagnostics",
+  "fullShutdownUri" : "http://127.0.0.1:19002/admin/shutdown?all=true",
+  "metadata_node" : "asterix_nc1",
+  "ncs" : [ {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
+    "node_id" : "asterix_nc1",
+    "partitions" : [ {
+      "active" : true,
+      "partition_id" : "partition_0"
+    }, {
+      "active" : true,
+      "partition_id" : "partition_1"
+    } ],
+    "state" : "ACTIVE",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
+  }, {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
+    "node_id" : "asterix_nc2",
+    "partitions" : [ {
+      "active" : true,
+      "partition_id" : "partition_2"
+    }, {
+      "active" : true,
+      "partition_id" : "partition_3"
+    } ],
+    "state" : "ACTIVE",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
+  } ],
+  "replicationUri" : "http://127.0.0.1:19002/admin/cluster/replication",
+  "shutdownUri" : "http://127.0.0.1:19002/admin/shutdown",
+  "state" : "ACTIVE",
+  "versionUri" : "http://127.0.0.1:19002/admin/version"
 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.adm
index 11e964c..7818a58 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.adm
@@ -1,129 +1,162 @@
 {
-    "cc": {
-        "configUri": "http://127.0.0.1:19002/admin/cluster/cc/config",
-        "statsUri": "http://127.0.0.1:19002/admin/cluster/cc/stats",
-        "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
+  "cc" : {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/cc/config",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/cc/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
+  },
+  "config" : {
+    "api.port" : 19002,
+    "cluster.partitions" : {
+      "0" : {
+        "partitionId" : 0,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 0
+      },
+      "1" : {
+        "partitionId" : 1,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 1
+      },
+      "2" : {
+        "partitionId" : 2,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 0
+      },
+      "3" : {
+        "partitionId" : 3,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 1
+      }
     },
-    "config": {
-        "api.port": 19002,
-        "cluster.partitions": {
-            "0": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-            "1": "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc1",
-            "2": "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-            "3": "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
-        },
-        "compiler.framesize": 32768,
-        "compiler.groupmemory": 163840,
-        "compiler.joinmemory": 262144,
-        "compiler.parallelism": -1,
-        "compiler.pregelix.home": "~/pregelix",
-        "compiler.sortmemory": 327680,
-        "core.dump.paths": {},
-        "feed.central.manager.port": 4500,
-        "feed.max.threshold.period": 5,
-        "feed.memory.available.wait.timeout": 10,
-        "feed.memory.global.budget": 67108864,
-        "feed.pending.work.threshold": 50,
-        "feed.port": 19003,
-        "instance.name": null,
-        "log.level": "INFO",
-        "max.wait.active.cluster": 60,
-        "metadata.callback.port": 0,
-        "metadata.node": "asterix_nc1",
-        "metadata.partition": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-        "metadata.port": 0,
-        "metadata.registration.timeout.secs": 60,
-        "node.partitions": {
-            "asterix_nc1": [
-                "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-                "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc1"
-            ],
-            "asterix_nc2": [
-                "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-                "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
-            ]
-        },
-        "node.stores": {
-            "asterix_nc1": [
-                "iodevice0",
-                "iodevice1"
-            ],
-            "asterix_nc2": [
-                "iodevice0",
-                "iodevice1"
-            ]
-        },
-        "plot.activate": false,
-        "storage.buffercache.maxopenfiles": 2147483647,
-        "storage.buffercache.pagesize": 32768,
-        "storage.buffercache.size": 50331648,
-        "storage.lsm.bloomfilter.falsepositiverate": 0.01,
-        "storage.memorycomponent.globalbudget": 536870912,
-        "storage.memorycomponent.numcomponents": 2,
-        "storage.memorycomponent.numpages": 8,
-        "storage.memorycomponent.pagesize": 131072,
-        "storage.metadata.memorycomponent.numpages": 256,
-        "transaction.log.dirs": {
-            "asterix_nc1": "target/txnLogDir/asterix_nc1",
-            "asterix_nc2": "target/txnLogDir/asterix_nc2"
-        },
-        "txn.commitprofiler.reportinterval": 5,
-        "txn.job.recovery.memorysize": 67108864,
-        "txn.lock.escalationthreshold": 1000,
-        "txn.lock.shrinktimer": 5000,
-        "txn.lock.timeout.sweepthreshold": 10000,
-        "txn.lock.timeout.waitthreshold": 60000,
-        "txn.log.buffer.numpages": 8,
-        "txn.log.buffer.pagesize": 131072,
-        "txn.log.checkpoint.history": 0,
-        "txn.log.checkpoint.lsnthreshold": 67108864,
-        "txn.log.checkpoint.pollfrequency": 120,
-        "txn.log.partitionsize": 268435456,
-        "web.port": 19001,
-        "web.queryinterface.port": 19006,
-        "web.secondary.port": 19005
+    "compiler.framesize" : 32768,
+    "compiler.groupmemory" : 163840,
+    "compiler.joinmemory" : 262144,
+    "compiler.parallelism" : -1,
+    "compiler.pregelix.home" : "~/pregelix",
+    "compiler.sortmemory" : 327680,
+    "core.dump.paths" : { },
+    "feed.central.manager.port" : 4500,
+    "feed.max.threshold.period" : 5,
+    "feed.memory.available.wait.timeout" : 10,
+    "feed.memory.global.budget" : 67108864,
+    "feed.pending.work.threshold" : 50,
+    "feed.port" : 19003,
+    "instance.name" : null,
+    "log.level" : "INFO",
+    "max.wait.active.cluster" : 60,
+    "metadata.callback.port" : 0,
+    "metadata.node" : "asterix_nc1",
+    "metadata.partition" : {
+      "partitionId" : 0,
+      "nodeId" : "asterix_nc1",
+      "activeNodeId" : "asterix_nc1",
+      "active" : true,
+      "iodeviceNum" : 0
     },
-    "diagnosticsUri": "http://127.0.0.1:19002/admin/diagnostics",
-    "fullShutdownUri": "http://127.0.0.1:19002/admin/shutdown?all=true",
-    "metadata_node": "asterix_nc1",
-    "ncs": [
-        {
-            "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
-            "node_id": "asterix_nc1",
-            "partitions": [
-                {
-                    "active": true,
-                    "partition_id": "partition_0"
-                },
-                {
-                    "active": true,
-                    "partition_id": "partition_1"
-                }
-            ],
-            "state": "ACTIVE",
-            "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
-            "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
-        },
-        {
-            "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
-            "node_id": "asterix_nc2",
-            "partitions": [
-                {
-                    "active": true,
-                    "partition_id": "partition_2"
-                },
-                {
-                    "active": true,
-                    "partition_id": "partition_3"
-                }
-            ],
-            "state": "ACTIVE",
-            "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
-            "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
-        }
-    ],
-    "replicationUri": "http://127.0.0.1:19002/admin/cluster/replication",
-    "shutdownUri": "http://127.0.0.1:19002/admin/shutdown",
-    "state": "ACTIVE",
-    "versionUri": "http://127.0.0.1:19002/admin/version"
+    "metadata.port" : 0,
+    "metadata.registration.timeout.secs" : 60,
+    "node.partitions" : {
+      "asterix_nc1" : [ {
+        "partitionId" : 0,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 0
+      }, {
+        "partitionId" : 1,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 1
+      } ],
+      "asterix_nc2" : [ {
+        "partitionId" : 2,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 0
+      }, {
+        "partitionId" : 3,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 1
+      } ]
+    },
+    "node.stores" : {
+      "asterix_nc1" : [ "iodevice0", "iodevice1" ],
+      "asterix_nc2" : [ "iodevice0", "iodevice1" ]
+    },
+    "plot.activate" : false,
+    "storage.buffercache.maxopenfiles" : 2147483647,
+    "storage.buffercache.pagesize" : 32768,
+    "storage.buffercache.size" : 50331648,
+    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
+    "storage.memorycomponent.globalbudget" : 536870912,
+    "storage.memorycomponent.numcomponents" : 2,
+    "storage.memorycomponent.numpages" : 8,
+    "storage.memorycomponent.pagesize" : 131072,
+    "storage.metadata.memorycomponent.numpages" : 256,
+    "transaction.log.dirs" : {
+      "asterix_nc1" : "target/txnLogDir/asterix_nc1",
+      "asterix_nc2" : "target/txnLogDir/asterix_nc2"
+    },
+    "txn.commitprofiler.reportinterval" : 5,
+    "txn.job.recovery.memorysize" : 67108864,
+    "txn.lock.escalationthreshold" : 1000,
+    "txn.lock.shrinktimer" : 5000,
+    "txn.lock.timeout.sweepthreshold" : 10000,
+    "txn.lock.timeout.waitthreshold" : 60000,
+    "txn.log.buffer.numpages" : 8,
+    "txn.log.buffer.pagesize" : 131072,
+    "txn.log.checkpoint.history" : 0,
+    "txn.log.checkpoint.lsnthreshold" : 67108864,
+    "txn.log.checkpoint.pollfrequency" : 120,
+    "txn.log.partitionsize" : 268435456,
+    "web.port" : 19001,
+    "web.queryinterface.port" : 19006,
+    "web.secondary.port" : 19005
+  },
+  "diagnosticsUri" : "http://127.0.0.1:19002/admin/diagnostics",
+  "fullShutdownUri" : "http://127.0.0.1:19002/admin/shutdown?all=true",
+  "metadata_node" : "asterix_nc1",
+  "ncs" : [ {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
+    "node_id" : "asterix_nc1",
+    "partitions" : [ {
+      "active" : true,
+      "partition_id" : "partition_0"
+    }, {
+      "active" : true,
+      "partition_id" : "partition_1"
+    } ],
+    "state" : "ACTIVE",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
+  }, {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
+    "node_id" : "asterix_nc2",
+    "partitions" : [ {
+      "active" : true,
+      "partition_id" : "partition_2"
+    }, {
+      "active" : true,
+      "partition_id" : "partition_3"
+    } ],
+    "state" : "ACTIVE",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
+  } ],
+  "replicationUri" : "http://127.0.0.1:19002/admin/cluster/replication",
+  "shutdownUri" : "http://127.0.0.1:19002/admin/shutdown",
+  "state" : "ACTIVE",
+  "versionUri" : "http://127.0.0.1:19002/admin/version"
 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.adm
index 83f18f1..71d6f8a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.adm
@@ -1,129 +1,162 @@
 {
-    "cc": {
-        "configUri": "http://127.0.0.1:19002/admin/cluster/cc/config",
-        "statsUri": "http://127.0.0.1:19002/admin/cluster/cc/stats",
-        "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
+  "cc" : {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/cc/config",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/cc/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
+  },
+  "config" : {
+    "api.port" : 19002,
+    "cluster.partitions" : {
+      "0" : {
+        "partitionId" : 0,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 0
+      },
+      "1" : {
+        "partitionId" : 1,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 1
+      },
+      "2" : {
+        "partitionId" : 2,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 0
+      },
+      "3" : {
+        "partitionId" : 3,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 1
+      }
     },
-    "config": {
-        "api.port": 19002,
-        "cluster.partitions": {
-            "0": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-            "1": "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc1",
-            "2": "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-            "3": "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
-        },
-        "compiler.framesize": 32768,
-        "compiler.groupmemory": 163840,
-        "compiler.joinmemory": 262144,
-        "compiler.parallelism": 3,
-        "compiler.pregelix.home": "~/pregelix",
-        "compiler.sortmemory": 327680,
-        "core.dump.paths": {},
-        "feed.central.manager.port": 4500,
-        "feed.max.threshold.period": 5,
-        "feed.memory.available.wait.timeout": 10,
-        "feed.memory.global.budget": 67108864,
-        "feed.pending.work.threshold": 50,
-        "feed.port": 19003,
-        "instance.name": null,
-        "log.level": "INFO",
-        "max.wait.active.cluster": 60,
-        "metadata.callback.port": 0,
-        "metadata.node": "asterix_nc1",
-        "metadata.partition": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-        "metadata.port": 0,
-        "metadata.registration.timeout.secs": 60,
-        "node.partitions": {
-            "asterix_nc1": [
-                "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-                "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc1"
-            ],
-            "asterix_nc2": [
-                "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-                "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
-            ]
-        },
-        "node.stores": {
-            "asterix_nc1": [
-                "iodevice0",
-                "iodevice1"
-            ],
-            "asterix_nc2": [
-                "iodevice0",
-                "iodevice1"
-            ]
-        },
-        "plot.activate": false,
-        "storage.buffercache.maxopenfiles": 2147483647,
-        "storage.buffercache.pagesize": 32768,
-        "storage.buffercache.size": 50331648,
-        "storage.lsm.bloomfilter.falsepositiverate": 0.01,
-        "storage.memorycomponent.globalbudget": 536870912,
-        "storage.memorycomponent.numcomponents": 2,
-        "storage.memorycomponent.numpages": 8,
-        "storage.memorycomponent.pagesize": 131072,
-        "storage.metadata.memorycomponent.numpages": 256,
-        "transaction.log.dirs": {
-            "asterix_nc1": "target/txnLogDir/asterix_nc1",
-            "asterix_nc2": "target/txnLogDir/asterix_nc2"
-        },
-        "txn.commitprofiler.reportinterval": 5,
-        "txn.job.recovery.memorysize": 67108864,
-        "txn.lock.escalationthreshold": 1000,
-        "txn.lock.shrinktimer": 5000,
-        "txn.lock.timeout.sweepthreshold": 10000,
-        "txn.lock.timeout.waitthreshold": 60000,
-        "txn.log.buffer.numpages": 8,
-        "txn.log.buffer.pagesize": 131072,
-        "txn.log.checkpoint.history": 0,
-        "txn.log.checkpoint.lsnthreshold": 67108864,
-        "txn.log.checkpoint.pollfrequency": 120,
-        "txn.log.partitionsize": 268435456,
-        "web.port": 19001,
-        "web.queryinterface.port": 19006,
-        "web.secondary.port": 19005
+    "compiler.framesize" : 32768,
+    "compiler.groupmemory" : 163840,
+    "compiler.joinmemory" : 262144,
+    "compiler.parallelism" : 3,
+    "compiler.pregelix.home" : "~/pregelix",
+    "compiler.sortmemory" : 327680,
+    "core.dump.paths" : { },
+    "feed.central.manager.port" : 4500,
+    "feed.max.threshold.period" : 5,
+    "feed.memory.available.wait.timeout" : 10,
+    "feed.memory.global.budget" : 67108864,
+    "feed.pending.work.threshold" : 50,
+    "feed.port" : 19003,
+    "instance.name" : null,
+    "log.level" : "INFO",
+    "max.wait.active.cluster" : 60,
+    "metadata.callback.port" : 0,
+    "metadata.node" : "asterix_nc1",
+    "metadata.partition" : {
+      "partitionId" : 0,
+      "nodeId" : "asterix_nc1",
+      "activeNodeId" : "asterix_nc1",
+      "active" : true,
+      "iodeviceNum" : 0
     },
-    "diagnosticsUri": "http://127.0.0.1:19002/admin/diagnostics",
-    "fullShutdownUri": "http://127.0.0.1:19002/admin/shutdown?all=true",
-    "metadata_node": "asterix_nc1",
-    "ncs": [
-        {
-            "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
-            "node_id": "asterix_nc1",
-            "partitions": [
-                {
-                    "active": true,
-                    "partition_id": "partition_0"
-                },
-                {
-                    "active": true,
-                    "partition_id": "partition_1"
-                }
-            ],
-            "state": "ACTIVE",
-            "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
-            "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
-        },
-        {
-            "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
-            "node_id": "asterix_nc2",
-            "partitions": [
-                {
-                    "active": true,
-                    "partition_id": "partition_2"
-                },
-                {
-                    "active": true,
-                    "partition_id": "partition_3"
-                }
-            ],
-            "state": "ACTIVE",
-            "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
-            "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
-        }
-    ],
-    "replicationUri": "http://127.0.0.1:19002/admin/cluster/replication",
-    "shutdownUri": "http://127.0.0.1:19002/admin/shutdown",
-    "state": "ACTIVE",
-    "versionUri": "http://127.0.0.1:19002/admin/version"
+    "metadata.port" : 0,
+    "metadata.registration.timeout.secs" : 60,
+    "node.partitions" : {
+      "asterix_nc1" : [ {
+        "partitionId" : 0,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 0
+      }, {
+        "partitionId" : 1,
+        "nodeId" : "asterix_nc1",
+        "activeNodeId" : "asterix_nc1",
+        "active" : true,
+        "iodeviceNum" : 1
+      } ],
+      "asterix_nc2" : [ {
+        "partitionId" : 2,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 0
+      }, {
+        "partitionId" : 3,
+        "nodeId" : "asterix_nc2",
+        "activeNodeId" : "asterix_nc2",
+        "active" : true,
+        "iodeviceNum" : 1
+      } ]
+    },
+    "node.stores" : {
+      "asterix_nc1" : [ "iodevice0", "iodevice1" ],
+      "asterix_nc2" : [ "iodevice0", "iodevice1" ]
+    },
+    "plot.activate" : false,
+    "storage.buffercache.maxopenfiles" : 2147483647,
+    "storage.buffercache.pagesize" : 32768,
+    "storage.buffercache.size" : 50331648,
+    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
+    "storage.memorycomponent.globalbudget" : 536870912,
+    "storage.memorycomponent.numcomponents" : 2,
+    "storage.memorycomponent.numpages" : 8,
+    "storage.memorycomponent.pagesize" : 131072,
+    "storage.metadata.memorycomponent.numpages" : 256,
+    "transaction.log.dirs" : {
+      "asterix_nc1" : "target/txnLogDir/asterix_nc1",
+      "asterix_nc2" : "target/txnLogDir/asterix_nc2"
+    },
+    "txn.commitprofiler.reportinterval" : 5,
+    "txn.job.recovery.memorysize" : 67108864,
+    "txn.lock.escalationthreshold" : 1000,
+    "txn.lock.shrinktimer" : 5000,
+    "txn.lock.timeout.sweepthreshold" : 10000,
+    "txn.lock.timeout.waitthreshold" : 60000,
+    "txn.log.buffer.numpages" : 8,
+    "txn.log.buffer.pagesize" : 131072,
+    "txn.log.checkpoint.history" : 0,
+    "txn.log.checkpoint.lsnthreshold" : 67108864,
+    "txn.log.checkpoint.pollfrequency" : 120,
+    "txn.log.partitionsize" : 268435456,
+    "web.port" : 19001,
+    "web.queryinterface.port" : 19006,
+    "web.secondary.port" : 19005
+  },
+  "diagnosticsUri" : "http://127.0.0.1:19002/admin/diagnostics",
+  "fullShutdownUri" : "http://127.0.0.1:19002/admin/shutdown?all=true",
+  "metadata_node" : "asterix_nc1",
+  "ncs" : [ {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
+    "node_id" : "asterix_nc1",
+    "partitions" : [ {
+      "active" : true,
+      "partition_id" : "partition_0"
+    }, {
+      "active" : true,
+      "partition_id" : "partition_1"
+    } ],
+    "state" : "ACTIVE",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
+  }, {
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
+    "node_id" : "asterix_nc2",
+    "partitions" : [ {
+      "active" : true,
+      "partition_id" : "partition_2"
+    }, {
+      "active" : true,
+      "partition_id" : "partition_3"
+    } ],
+    "state" : "ACTIVE",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
+  } ],
+  "replicationUri" : "http://127.0.0.1:19002/admin/cluster/replication",
+  "shutdownUri" : "http://127.0.0.1:19002/admin/shutdown",
+  "state" : "ACTIVE",
+  "versionUri" : "http://127.0.0.1:19002/admin/version"
 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_3/cluster_state_3.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_3/cluster_state_3.1.adm
index b0815ee..14a00d0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_3/cluster_state_3.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_3/cluster_state_3.1.adm
@@ -1,36 +1,29 @@
-{"ncs": [
-    {
-        "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
-        "node_id": "asterix_nc1",
-        "partitions": [
-            {
-                "active": true,
-                "partition_id": "partition_0"
-            },
-            {
-                "active": true,
-                "partition_id": "partition_1"
-            }
-        ],
-        "state": "ACTIVE",
-        "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
-        "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
-    },
-    {
-        "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
-        "node_id": "asterix_nc2",
-        "partitions": [
-            {
-                "active": true,
-                "partition_id": "partition_2"
-            },
-            {
-                "active": true,
-                "partition_id": "partition_3"
-            }
-        ],
-        "state": "ACTIVE",
-        "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
-        "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
-    }
-]}
+{
+  "ncs" : [ {
+    "node_id" : "asterix_nc1",
+    "state" : "ACTIVE",
+    "partitions" : [ {
+      "partition_id" : "partition_0",
+      "active" : true
+    }, {
+      "partition_id" : "partition_1",
+      "active" : true
+    } ],
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
+  }, {
+    "node_id" : "asterix_nc2",
+    "state" : "ACTIVE",
+    "partitions" : [ {
+      "partition_id" : "partition_2",
+      "active" : true
+    }, {
+      "partition_id" : "partition_3",
+      "active" : true
+    } ],
+    "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/config",
+    "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/stats",
+    "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc2/threaddump"
+  } ]
+}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_4/cluster_state_4.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_4/cluster_state_4.1.adm
index 4635690..5e88f5c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_4/cluster_state_4.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_4/cluster_state_4.1.adm
@@ -1,17 +1,14 @@
 {
-    "configUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
-    "node_id": "asterix_nc1",
-    "partitions": [
-        {
-            "active": true,
-            "partition_id": "partition_0"
-        },
-        {
-            "active": true,
-            "partition_id": "partition_1"
-        }
-    ],
-    "state": "ACTIVE",
-    "statsUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
-    "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
-}
+  "node_id" : "asterix_nc1",
+  "state" : "ACTIVE",
+  "partitions" : [ {
+    "partition_id" : "partition_0",
+    "active" : true
+  }, {
+    "partition_id" : "partition_1",
+    "active" : true
+  } ],
+  "configUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/config",
+  "statsUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/stats",
+  "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/node/asterix_nc1/threaddump"
+}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_1/cluster_state_cc_1.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_1/cluster_state_cc_1.1.adm
index 5e1e154..879ecbc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_1/cluster_state_cc_1.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_1/cluster_state_cc_1.1.adm
@@ -1,5 +1,5 @@
 {
-    "configUri": "http://127.0.0.1:19002/admin/cluster/cc/config",
-    "statsUri": "http://127.0.0.1:19002/admin/cluster/cc/stats",
-    "threadDumpUri": "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
-}
+  "configUri" : "http://127.0.0.1:19002/admin/cluster/cc/config",
+  "statsUri" : "http://127.0.0.1:19002/admin/cluster/cc/stats",
+  "threadDumpUri" : "http://127.0.0.1:19002/admin/cluster/cc/threaddump"
+}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.regexadm
index 196a12b..01ff72a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.regexadm
@@ -1,27 +1,24 @@
 \{
-    "date": ".*",
-    "gcs": \[
-        \{
-            "collection-count": .*,
-            "collection-time": .*,
-            "name": ".*"
-        \},
-        \{
-            "collection-count": .*,
-            "collection-time": .*,
-            "name": ".*"
-        \}
-    \],
-    "heap_committed_size": [0-9]*,
-    "heap_init_size": [0-9]*,
-    "heap_max_size": [0-9]*,
-    "heap_used_size": [0-9]*,
-    "nonheap_committed_size": [0-9]*,
-    "nonheap_init_size": [0-9]*,
-    "nonheap_max_size": -?[0-9]*,
-    "nonheap_used_size": [0-9]*,
-    "peak_thread_count": [0-9]*,
-    "started_thread_count": [0-9]*,
-    "system_load_average": [0-9\.]*,
-    "thread_count": [0-9]*
-\}
\ No newline at end of file
+  "gcs" : \[ \{
+    "name" : ".*",
+    "collection-time" : .*,
+    "collection-count" : .*
+  \}, \{
+    "name" : ".*",
+    "collection-time" : .*,
+    "collection-count" : .*
+  \} \],
+  "date" : ".*",
+  "heap_init_size" : [0-9]*,
+  "heap_used_size" : [0-9]*,
+  "heap_committed_size" : [0-9]*,
+  "heap_max_size" : [0-9]*,
+  "nonheap_init_size" : [0-9]*,
+  "nonheap_used_size" : [0-9]*,
+  "nonheap_committed_size" : [0-9]*,
+  "nonheap_max_size" : -?[0-9]*,
+  "thread_count" : [0-9]*,
+  "peak_thread_count" : [0-9]*,
+  "started_thread_count" : [0-9]*,
+  "system_load_average" : [0-9\.]*
+\}*
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_nc_threaddump_1/cluster_state_cc_threaddump_1.1.regex b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_nc_threaddump_1/cluster_state_cc_threaddump_1.1.regex
index 1e5c47b..3f1bfdc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_nc_threaddump_1/cluster_state_cc_threaddump_1.1.regex
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_nc_threaddump_1/cluster_state_cc_threaddump_1.1.regex
@@ -1,10 +1,10 @@
-/"date": ".*"/
-/"threads": \[/
-/"id": [0-9]+/
-/"lock_name": ".*"/
-/"name": ".*"/
-/"stack": \[/
+/"date" : ".*"/
+/"threads" : \[/
+/"id" : [0-9]+/
+/"lock_name" : ".*"/
+/"name" : ".*"/
+/"stack" : \[/
 /"java.lang.Thread.run\(Thread.java:[0-9]+\)"/
-/"state": "TIMED_WAITING"/
-/"state": "RUNNABLE"/
-/"state": "WAITING"/
\ No newline at end of file
+/"state" : "TIMED_WAITING"/
+/"state" : "RUNNABLE"/
+/"state" : "WAITING"/
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/diagnostics_1/diagnostics_1.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/diagnostics_1/diagnostics_1.1.regexadm
index 29c03bf..b2dafd9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/diagnostics_1/diagnostics_1.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/diagnostics_1/diagnostics_1.1.regexadm
@@ -1,10 +1,7 @@
-.*"cc": \{
-        "config": \{.*
-        \},
-        "stats": \{.*
-        \},
-        "threaddump": \{.*
-        \}
-.*"ncs".*"node_id": "asterix_nc1",
-.*"threaddump".*"node_id": "asterix_nc2",
-.*"threaddump".*
\ No newline at end of file
+.*"cc" : \{.*
+    "stats" : \{.*
+    \},.*
+    "threaddump" : \{.*
+    \},.*
+    "config" : \{.*
+    \}.*"ncs".*"node_id" : "asterix_nc1".*"threaddump".*"node_id" : "asterix_nc2".*"threaddump".*
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/replication/replication.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/replication/replication.1.adm
index 8adc10c..74e019b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/replication/replication.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/replication/replication.1.adm
@@ -1,9 +1,11 @@
-{"config": {
-    "enabled": false,
-    "factor": 2,
-    "log.batchsize": 4096,
-    "log.buffer.numpages": 8,
-    "log.buffer.pagesize": 131072,
-    "max.remote.recovery.attempts": 5,
-    "timeout": 30
-}}
+{
+  "config" : {
+    "enabled" : false,
+    "factor" : 2,
+    "log.batchsize" : 4096,
+    "log.buffer.numpages" : 8,
+    "log.buffer.pagesize" : 131072,
+    "max.remote.recovery.attempts" : 5,
+    "timeout" : 30
+  }
+}
\ No newline at end of file
diff --git a/asterixdb/asterix-client-helper/pom.xml b/asterixdb/asterix-client-helper/pom.xml
index 3270fbb..04de18a 100644
--- a/asterixdb/asterix-client-helper/pom.xml
+++ b/asterixdb/asterix-client-helper/pom.xml
@@ -108,8 +108,12 @@
       <artifactId>commons-io</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
   </dependencies>
 </project>
diff --git a/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/GetClusterStateCommand.java b/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/GetClusterStateCommand.java
index 77ed78f..e0fcb06 100644
--- a/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/GetClusterStateCommand.java
+++ b/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/GetClusterStateCommand.java
@@ -24,10 +24,11 @@
 
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.clienthelper.Args;
 import org.apache.commons.io.IOUtils;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class GetClusterStateCommand extends RemoteCommand {
 
@@ -49,8 +50,9 @@
             conn = openConnection(args.getClusterStatePath(), Method.GET);
             if (conn.getResponseCode() == HttpServletResponse.SC_OK) {
                 String result = IOUtils.toString(conn.getInputStream(), StandardCharsets.UTF_8.name());
-                JSONObject json = new JSONObject(result);
-                final String state = json.getString("state");
+                ObjectMapper om = new ObjectMapper();
+                JsonNode json = om.readTree(result);
+                final String state = json.get("state").asText();
                 logState(state);
                 switch (state) {
                     case "ACTIVE":
@@ -66,9 +68,6 @@
         } catch (IOException e) { // NOSONAR - log or rethrow exception
             logState("DOWN");
             return 1;
-        } catch (JSONException e) { // NOSONAR - log or rethrow exception
-            logState("UNKNOWN (malformed response)");
-            return 3;
         }
     }
 }
diff --git a/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/WaitForClusterCommand.java b/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/WaitForClusterCommand.java
index b0b4c6f..dad9f8c 100644
--- a/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/WaitForClusterCommand.java
+++ b/asterixdb/asterix-client-helper/src/main/java/org/apache/asterix/clienthelper/commands/WaitForClusterCommand.java
@@ -25,10 +25,11 @@
 
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.clienthelper.Args;
 import org.apache.commons.io.IOUtils;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class WaitForClusterCommand extends RemoteCommand {
 
@@ -66,14 +67,15 @@
                 conn = openConnection(args.getClusterStatePath(), Method.GET);
                 if (conn.getResponseCode() == HttpServletResponse.SC_OK) {
                     String result = IOUtils.toString(conn.getInputStream(), StandardCharsets.UTF_8.name());
-                    JSONObject json = new JSONObject(result);
-                    lastState = json.getString("state");
+                    ObjectMapper om = new ObjectMapper();
+                    JsonNode json = om.readTree(result);
+                    lastState = json.get("state").asText();
                     if ("ACTIVE".equals(lastState)) {
                         log("Cluster started and is ACTIVE.");
                         return 0;
                     }
                 }
-            } catch (JSONException |IOException e) { //NOSONAR - log or rethrow exception
+            } catch (IOException e) { //NOSONAR - log or rethrow exception
                 // ignore exception, try again
             }
         }
diff --git a/asterixdb/asterix-common/pom.xml b/asterixdb/asterix-common/pom.xml
index d4a4517..722e1c5 100644
--- a/asterixdb/asterix-common/pom.xml
+++ b/asterixdb/asterix-common/pom.xml
@@ -270,10 +270,6 @@
       <version>1.2.17</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-    </dependency>
-    <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>javax.servlet-api</artifactId>
       <scope>test</scope>
@@ -307,6 +303,19 @@
       <version>2.0.2-beta</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>18.0</version>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractProperties.java
index b6a960f..eccbff2 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractProperties.java
@@ -49,9 +49,14 @@
         Map<String, Object> properties = new HashMap<>();
         for (Method m : getClass().getMethods()) {
             PropertyKey key = m.getAnnotation(PropertyKey.class);
+            Stringify stringify = m.getAnnotation(Stringify.class);
             if (key != null) {
                 try {
-                    properties.put(keyTransformer.apply(key.value()), m.invoke(this));
+                    if (stringify != null) {
+                        properties.put(keyTransformer.apply(key.value()), String.valueOf(m.invoke(this)));
+                    } else {
+                        properties.put(keyTransformer.apply(key.value()), m.invoke(this));
+                    }
                 } catch (Exception e) {
                     LOGGER.log(Level.INFO, "Error accessing property: " + key.value(), e);
                 }
@@ -65,6 +70,10 @@
         String value();
     }
 
+    @Retention(RetentionPolicy.RUNTIME)
+    public @interface Stringify {
+    }
+
     public static List<AbstractProperties> getImplementations() {
         return Collections.unmodifiableList(IMPLS);
     }
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ExternalProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ExternalProperties.java
index dac154c..eb6bda5 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ExternalProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ExternalProperties.java
@@ -22,35 +22,35 @@
 
 public class ExternalProperties extends AbstractProperties {
 
-    private static final String EXTERNAL_WEBPORT_KEY = "web.port";
-    private static final int EXTERNAL_WEBPORT_DEFAULT = 19001;
+    public static final String EXTERNAL_WEBPORT_KEY = "web.port";
+    public static final int EXTERNAL_WEBPORT_DEFAULT = 19001;
 
-    private static final String EXTERNAL_SECONDARY_WEBPORT_KEY = "web.secondary.port";
-    private static final int EXTERNAL_SECONDARY_WEBPORT_DEFAULT = 19005;
+    public static final String EXTERNAL_SECONDARY_WEBPORT_KEY = "web.secondary.port";
+    public static final int EXTERNAL_SECONDARY_WEBPORT_DEFAULT = 19005;
 
-    private static final String QUERY_WEBPORT_KEY = "web.queryinterface.port";
-    private static final int QUERY_WEBPORT_DEFAULT = 19006;
+    public static final String QUERY_WEBPORT_KEY = "web.queryinterface.port";
+    public static final int QUERY_WEBPORT_DEFAULT = 19006;
 
-    private static final String EXTERNAL_LOGLEVEL_KEY = "log.level";
-    private static final Level EXTERNAL_LOGLEVEL_DEFAULT = Level.WARNING;
+    public static final String EXTERNAL_LOGLEVEL_KEY = "log.level";
+    public static final Level EXTERNAL_LOGLEVEL_DEFAULT = Level.WARNING;
 
-    private static final String EXTERNAL_APISERVER_KEY = "api.port";
-    private static final int EXTERNAL_APISERVER_DEFAULT = 19002;
+    public static final String EXTERNAL_APISERVER_KEY = "api.port";
+    public static final int EXTERNAL_APISERVER_DEFAULT = 19002;
 
-    private static final String EXTERNAL_FEEDSERVER_KEY = "feed.port";
-    private static final int EXTERNAL_FEEDSERVER_DEFAULT = 19003;
+    public static final String EXTERNAL_FEEDSERVER_KEY = "feed.port";
+    public static final int EXTERNAL_FEEDSERVER_DEFAULT = 19003;
 
-    private static final String EXTERNAL_CC_JAVA_OPTS_KEY = "cc.java.opts";
-    private static final String EXTERNAL_CC_JAVA_OPTS_DEFAULT = "-Xmx1024m";
+    public static final String EXTERNAL_CC_JAVA_OPTS_KEY = "cc.java.opts";
+    public static final String EXTERNAL_CC_JAVA_OPTS_DEFAULT = "-Xmx1024m";
 
-    private static final String EXTERNAL_NC_JAVA_OPTS_KEY = "nc.java.opts";
-    private static final String EXTERNAL_NC_JAVA_OPTS_DEFAULT = "-Xmx1024m";
+    public static final String EXTERNAL_NC_JAVA_OPTS_KEY = "nc.java.opts";
+    public static final String EXTERNAL_NC_JAVA_OPTS_DEFAULT = "-Xmx1024m";
 
-    private static final String EXTERNAL_MAX_WAIT_FOR_ACTIVE_CLUSTER = "max.wait.active.cluster";
-    private static final int EXTERNAL_MAX_WAIT_FOR_ACTIVE_CLUSTER_DEFAULT = 60;
+    public static final String EXTERNAL_MAX_WAIT_FOR_ACTIVE_CLUSTER = "max.wait.active.cluster";
+    public static final int EXTERNAL_MAX_WAIT_FOR_ACTIVE_CLUSTER_DEFAULT = 60;
 
-    private static final String EXTERNAL_PLOT_ACTIVATE = "plot.activate";
-    private static final boolean EXTERNAL_PLOT_ACTIVATE_DEFAULT = false;
+    public static final String EXTERNAL_PLOT_ACTIVATE = "plot.activate";
+    public static final boolean EXTERNAL_PLOT_ACTIVATE_DEFAULT = false;
 
     public ExternalProperties(PropertiesAccessor accessor) {
         super(accessor);
@@ -87,6 +87,7 @@
     }
 
     @PropertyKey(EXTERNAL_LOGLEVEL_KEY)
+    @Stringify
     public Level getLogLevel() {
         return accessor.getProperty(EXTERNAL_LOGLEVEL_KEY, EXTERNAL_LOGLEVEL_DEFAULT,
                 PropertyInterpreters.getLevelPropertyInterpreter());
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/JSONUtil.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/JSONUtil.java
index 0cbf1b9..80df260 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/JSONUtil.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/JSONUtil.java
@@ -18,49 +18,65 @@
  */
 package org.apache.asterix.common.utils;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+import java.io.IOException;
 import java.util.Iterator;
 import java.util.logging.Logger;
 
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
 public class JSONUtil {
 
     private static final Logger LOGGER = Logger.getLogger(JSONUtil.class.getName());
 
     private static final String INDENT = "\t";
 
+    private static final ObjectMapper SORTED_MAPPER = new ObjectMapper();
+
     private JSONUtil() {
     }
 
+    static {
+        SORTED_MAPPER.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
+    }
+
+    public static String convertNode(final JsonNode node) throws JsonProcessingException {
+        final Object obj = SORTED_MAPPER.treeToValue(node, Object.class);
+        final String json = SORTED_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(obj);
+        return json;
+    }
+
     public static String indent(String str, int initialIndent) {
+        ObjectMapper om = new ObjectMapper();
         try {
-            return append(new StringBuilder(), new JSONObject(str), initialIndent).toString();
-        } catch (JSONException e) {
+            return appendObj(new StringBuilder(), om.readTree(str), initialIndent).toString();
+        } catch (IOException e) {
+            LOGGER.finest(String.valueOf(e));
             LOGGER.finest("Could not indent JSON string, returning the input string: " + str);
             return str;
         }
     }
 
-    private static StringBuilder append(StringBuilder sb, Object o, int indent) throws JSONException {
-        if (o instanceof JSONObject) {
-            return append(sb, (JSONObject) o, indent);
-        } else if (o instanceof JSONArray) {
-            return append(sb, (JSONArray) o, indent);
-        } else if (o instanceof String) {
-            return quoteAndEscape(sb, (String) o);
-        } else if (JSONObject.NULL.equals(o) || o instanceof Number || o instanceof Boolean) {
+    private static StringBuilder appendOrd(StringBuilder sb, JsonNode o, int indent) {
+        if (o.isObject()) {
+            return appendObj(sb, o, indent);
+        } else if (o.isArray()) {
+            return appendAry(sb, o, indent);
+        } else if (o.isTextual()) {
+            return quoteAndEscape(sb, o.asText());
+        } else if (o.isNull() || o.isIntegralNumber() || o.isBoolean()) {
             return sb.append(String.valueOf(o));
         }
         throw new UnsupportedOperationException(o.getClass().getSimpleName());
     }
 
-    private static StringBuilder append(StringBuilder builder, JSONObject jobj, int indent) throws JSONException {
+    private static StringBuilder appendObj(StringBuilder builder, JsonNode jobj, int indent) {
         StringBuilder sb = builder.append("{\n");
         boolean first = true;
-        for (Iterator it = jobj.keys(); it.hasNext();) {
-            final String key = (String) it.next();
+        for (Iterator<JsonNode> it = jobj.iterator(); it.hasNext();) {
+            final String key = it.next().asText();
             if (first) {
                 first = false;
             } else {
@@ -69,20 +85,32 @@
             sb = indent(sb, indent + 1);
             sb = quote(sb, key);
             sb = sb.append(": ");
-            sb = append(sb, jobj.get(key), indent + 1);
+            if (jobj.get(key).isArray()) {
+                sb = appendAry(sb, jobj.get(key), indent + 1);
+            } else if (jobj.get(key).isObject()) {
+                sb = appendObj(sb, jobj.get(key), indent + 1);
+            } else {
+                sb = appendOrd(sb, jobj.get(key), indent + 1);
+            }
         }
         sb = sb.append("\n");
         return indent(sb, indent).append("}");
     }
 
-    private static StringBuilder append(StringBuilder builder, JSONArray jarr, int indent) throws JSONException {
+    private static StringBuilder appendAry(StringBuilder builder, JsonNode jarr, int indent) {
         StringBuilder sb = builder.append("[\n");
-        for (int i = 0; i < jarr.length(); ++i) {
+        for (int i = 0; i < jarr.size(); ++i) {
             if (i > 0) {
                 sb = sb.append(",\n");
             }
             sb = indent(sb, indent + 1);
-            sb = append(sb, jarr.get(i), indent + 1);
+            if (jarr.get(i).isArray()) {
+                sb = appendAry(sb, jarr.get(i), indent + 1);
+            } else if (jarr.get(i).isObject()) {
+                sb = appendObj(sb, jarr.get(i), indent + 1);
+            } else {
+                sb = appendOrd(sb, jarr.get(i), indent + 1);
+            }
         }
         sb = sb.append("\n");
         return indent(sb, indent).append("]");
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/ResultExtractor.java b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/ResultExtractor.java
index 662888e..8399f7a 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/ResultExtractor.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/ResultExtractor.java
@@ -19,18 +19,24 @@
 package org.apache.asterix.test.aql;
 
 import java.io.InputStream;
+import java.io.StringWriter;
 import java.nio.charset.Charset;
+import java.util.Iterator;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.PrettyPrinter;
+import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.collect.Iterators;
+import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.commons.io.IOUtils;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.json.JSONTokener;
 
 /**
  * extracts results from the response of the QueryServiceServlet.
- *
  * As the response is not necessarily valid JSON, non-JSON content has to be extracted in some cases.
  * The current implementation creates a toomany copies of the data to be usable for larger results.
  */
@@ -39,150 +45,84 @@
     private static final Logger LOGGER = Logger.getLogger(ResultExtractor.class.getName());
 
     public static InputStream extract(InputStream resultStream) throws Exception {
-        final Charset utf8 = Charset.forName("UTF-8");
-        String result = IOUtils.toString(resultStream, utf8);
+        ObjectMapper om = new ObjectMapper();
+        StringWriter sw = new StringWriter();
+        String resultStr = IOUtils.toString(resultStream, Charset.defaultCharset());
+        PrettyPrinter singleLine = new SingleLinePrettyPrinter();
+        ObjectNode result = om.readValue(resultStr, ObjectNode.class);
 
         LOGGER.fine("+++++++\n" + result + "\n+++++++\n");
 
-        JSONTokener tokener = new JSONTokener(result);
-        tokener.nextTo('{');
-        tokener.next('{');
-        String name;
-        String type = null;
-        String status = null;
+        String type = "";
+        String status = "";
         String results = "";
-        while ((name = getFieldName(tokener)) != null) {
-            if ("requestID".equals(name) || "signature".equals(name)) {
-                getStringField(tokener);
-            } else if ("status".equals(name)) {
-                status = getStringField(tokener);
-            } else if ("type".equals(name)) {
-                type = getStringField(tokener);
-            } else if ("metrics".equals(name)) {
-                JSONObject metrics = getObjectField(tokener);
-                LOGGER.fine(name + ": " + metrics);
-            } else if ("errors".equals(name)) {
-                JSONArray errors = getArrayField(tokener);
-                LOGGER.fine(name + ": " + errors);
-                JSONObject err = errors.getJSONObject(0);
-                throw new Exception(err.getString("msg"));
-            } else if ("results".equals(name)) {
-                results = getResults(tokener, type);
-            } else {
-                throw tokener.syntaxError(name + ": unanticipated field");
+        String field = "";
+        for (Iterator<String> sIter = result.fieldNames(); sIter.hasNext();) {
+            field = sIter.next();
+            switch (field) {
+                case "requestID":
+                    break;
+                case "signature":
+                    break;
+                case "status":
+                    status = om.writeValueAsString(result.get(field));
+                    break;
+                case "type":
+                    type = om.writeValueAsString(result.get(field));
+                    break;
+                case "metrics":
+                    LOGGER.fine(om.writeValueAsString(result.get(field)));
+                    break;
+                case "errors":
+                    JsonNode errors = result.get(field).get(0).get("msg");
+                    throw new AsterixException(errors.asText());
+                case "results":
+                    if (result.get(field).size() <= 1) {
+                        if (result.get(field).size() == 0) {
+                            results = "";
+                        } else if (result.get(field).isArray()) {
+                            if (result.get(field).get(0).isTextual()) {
+                                results = result.get(field).get(0).asText();
+                            } else {
+                                ObjectMapper omm = new ObjectMapper();
+                                omm.setDefaultPrettyPrinter(singleLine);
+                                omm.enable(SerializationFeature.INDENT_OUTPUT);
+                                results = omm.writer(singleLine).writeValueAsString(result.get(field));
+                            }
+                        } else {
+                            results = om.writeValueAsString(result.get(field));
+                        }
+                    } else {
+                        StringBuilder sb = new StringBuilder();
+                        JsonNode[] fields = Iterators.toArray(result.get(field).elements(), JsonNode.class);
+                        if (fields.length > 1) {
+                            for (JsonNode f : fields) {
+                                if (f.isObject()) {
+                                    sb.append(om.writeValueAsString(f));
+                                } else {
+                                    sb.append(f.asText());
+                                }
+                            }
+                        }
+                        results = sb.toString();
+                    }
+                    break;
+                default:
+                    throw new AsterixException(field + "unanticipated field");
             }
         }
-        while (tokener.more() && tokener.skipTo('}') != '}') {
-            // skip along
-        }
-        tokener.next('}');
-        if (! "success".equals(status)) {
-            throw new Exception("Unexpected status: '" + status + "'");
-        }
-        return IOUtils.toInputStream(results, utf8);
+
+        return IOUtils.toInputStream(results);
     }
 
     public static String extractHandle(InputStream resultStream) throws Exception {
         final Charset utf8 = Charset.forName("UTF-8");
+        ObjectMapper om = new ObjectMapper();
         String result = IOUtils.toString(resultStream, utf8);
-        JSONObject parsed = new JSONObject(result);
-        JSONArray handle = parsed.getJSONArray("handle");
-        JSONObject res = new JSONObject();
-        res.put("handle", handle);
-        return res.toString();
-    }
-
-    private static String getFieldName(JSONTokener tokener) throws JSONException {
-        char c = tokener.skipTo('"');
-        if (c != '"') {
-            return null;
-        }
-        tokener.next('"');
-        return tokener.nextString('"');
-    }
-
-    private static String getStringField(JSONTokener tokener) throws JSONException {
-        tokener.skipTo('"');
-        tokener.next('"');
-        return tokener.nextString('"');
-    }
-
-    private static JSONArray getArrayField(JSONTokener tokener) throws JSONException {
-        tokener.skipTo(':');
-        tokener.next(':');
-        Object obj = tokener.nextValue();
-        if (obj instanceof JSONArray) {
-            return (JSONArray) obj;
-        } else {
-            throw tokener.syntaxError(String.valueOf(obj) + ": unexpected value");
-        }
-    }
-
-    private static JSONObject getObjectField(JSONTokener tokener) throws JSONException {
-        tokener.skipTo(':');
-        tokener.next(':');
-        Object obj = tokener.nextValue();
-        if (obj instanceof JSONObject) {
-            return (JSONObject) obj;
-        } else {
-            throw tokener.syntaxError(String.valueOf(obj) + ": unexpected value");
-        }
-    }
-
-    private static String getResults(JSONTokener tokener, String type) throws JSONException {
-        tokener.skipTo(':');
-        tokener.next(':');
-        StringBuilder result = new StringBuilder();
-        if (type != null) {
-            // a type was provided in the response and so the result is encoded as an array of escaped strings that
-            // need to be concatenated
-            Object obj = tokener.nextValue();
-            if (!(obj instanceof JSONArray)) {
-                throw tokener.syntaxError("array expected");
-            }
-            JSONArray array = (JSONArray) obj;
-            for (int i = 0; i < array.length(); ++i) {
-                result.append(array.getString(i));
-            }
-            return result.toString();
-        } else {
-            int level = 0;
-            boolean inQuote = false;
-            while (tokener.more()) {
-                char c = tokener.next();
-                switch (c) {
-                    case '{':
-                    case '[':
-                        ++level;
-                        result.append(c);
-                        break;
-                    case '}':
-                    case ']':
-                        --level;
-                        result.append(c);
-                        break;
-                    case '"':
-                        if (inQuote) {
-                            --level;
-                        } else {
-                            ++level;
-                        }
-                        inQuote = !inQuote;
-                        result.append(c);
-                        break;
-                    case ',':
-                        if (level == 0) {
-                            return result.toString().trim();
-                        } else {
-                            result.append(c);
-                        }
-                        break;
-                    default:
-                        result.append(c);
-                        break;
-                }
-            }
-        }
-        return null;
+        ObjectNode resultJson = om.readValue(result, ObjectNode.class);
+        JsonNode handle = resultJson.get("handle");
+        ObjectNode res = om.createObjectNode();
+        res.set("handle", handle);
+        return om.writeValueAsString(res);
     }
 }
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/SingleLinePrettyPrinter.java b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/SingleLinePrettyPrinter.java
new file mode 100644
index 0000000..52f68a0
--- /dev/null
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/SingleLinePrettyPrinter.java
@@ -0,0 +1,404 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.asterix.test.aql;
+
+import java.io.*;
+
+import com.fasterxml.jackson.core.*;
+import com.fasterxml.jackson.core.io.SerializedString;
+import com.fasterxml.jackson.core.util.DefaultIndenter;
+import com.fasterxml.jackson.core.util.Instantiatable;
+
+/**
+ * Default {@link PrettyPrinter} implementation that uses 2-space
+ * indentation with platform-default linefeeds.
+ * Usually this class is not instantiated directly, but instead
+ * method {@link JsonGenerator#useSingleLinePrettyPrinter} is
+ * used, which will use an instance of this class for operation.
+ */
+@SuppressWarnings("serial")
+public class SingleLinePrettyPrinter
+        implements PrettyPrinter, Instantiatable<SingleLinePrettyPrinter>, java.io.Serializable {
+    private static final long serialVersionUID = 1;
+
+    /**
+     * Constant that specifies default "root-level" separator to use between
+     * root values: a single space character.
+     *
+     * @since 2.1
+     */
+    public final static SerializedString DEFAULT_ROOT_VALUE_SEPARATOR = new SerializedString(" ");
+
+    /**
+     * Interface that defines objects that can produce indentation used
+     * to separate object entries and array values. Indentation in this
+     * context just means insertion of white space, independent of whether
+     * linefeeds are output.
+     */
+    public interface Indenter {
+        void writeIndentation(JsonGenerator jg, int level) throws IOException;
+
+        /**
+         * @return True if indenter is considered inline (does not add linefeeds),
+         *         false otherwise
+         */
+        boolean isInline();
+    }
+
+    // // // Config, indentation
+
+    /**
+     * By default, let's use only spaces to separate array values.
+     */
+    protected Indenter _arrayIndenter = FixedSpaceIndenter.instance;
+
+    /**
+     * By default, let's use linefeed-adding indenter for separate
+     * object entries. We'll further configure indenter to use
+     * system-specific linefeeds, and 2 spaces per level (as opposed to,
+     * say, single tabs)
+     */
+    protected Indenter _objectIndenter = new FixedSpaceIndenter();
+
+    /**
+     * String printed between root-level values, if any.
+     */
+    protected final SerializableString _rootSeparator;
+
+    // // // Config, other white space configuration
+
+    /**
+     * By default we will add spaces around colons used to
+     * separate object fields and values.
+     * If disabled, will not use spaces around colon.
+     */
+    protected boolean _spacesInObjectEntries = true;
+
+    // // // State:
+
+    /**
+     * Number of open levels of nesting. Used to determine amount of
+     * indentation to use.
+     */
+    protected transient int _nesting;
+
+    /*
+    /**********************************************************
+    /* Life-cycle (construct, configure)
+    /**********************************************************
+    */
+
+    public SingleLinePrettyPrinter() {
+        this(DEFAULT_ROOT_VALUE_SEPARATOR);
+    }
+
+    /**
+     * Constructor that specifies separator String to use between root values;
+     * if null, no separator is printed.
+     * <p>
+     * Note: simply constructs a {@link SerializedString} out of parameter,
+     * calls {@link #SingleLinePrettyPrinter(SerializableString)}
+     *
+     * @param rootSeparator
+     * @since 2.1
+     */
+    public SingleLinePrettyPrinter(String rootSeparator) {
+        this((rootSeparator == null) ? null : new SerializedString(rootSeparator));
+    }
+
+    /**
+     * Constructor that specifies separator String to use between root values;
+     * if null, no separator is printed.
+     *
+     * @param rootSeparator
+     * @since 2.1
+     */
+    public SingleLinePrettyPrinter(SerializableString rootSeparator) {
+        _rootSeparator = rootSeparator;
+    }
+
+    public SingleLinePrettyPrinter(SingleLinePrettyPrinter base) {
+        this(base, base._rootSeparator);
+    }
+
+    public SingleLinePrettyPrinter(SingleLinePrettyPrinter base, SerializableString rootSeparator) {
+        _arrayIndenter = base._arrayIndenter;
+        _objectIndenter = base._objectIndenter;
+        _spacesInObjectEntries = base._spacesInObjectEntries;
+        _nesting = base._nesting;
+
+        _rootSeparator = rootSeparator;
+    }
+
+    public SingleLinePrettyPrinter withRootSeparator(SerializableString rootSeparator) {
+        if (_rootSeparator == rootSeparator || (rootSeparator != null && rootSeparator.equals(_rootSeparator))) {
+            return this;
+        }
+        return new SingleLinePrettyPrinter(this, rootSeparator);
+    }
+
+    /**
+     * @since 2.6.0
+     */
+    public SingleLinePrettyPrinter withRootSeparator(String rootSeparator) {
+        return withRootSeparator((rootSeparator == null) ? null : new SerializedString(rootSeparator));
+    }
+
+    public void indentArraysWith(Indenter i) {
+        _arrayIndenter = (i == null) ? NopIndenter.instance : i;
+    }
+
+    public void indentObjectsWith(Indenter i) {
+        _objectIndenter = (i == null) ? NopIndenter.instance : i;
+    }
+
+    /**
+     * @deprecated Since 2.3 use {@link #withSpacesInObjectEntries} and {@link #withoutSpacesInObjectEntries()}
+     */
+    @Deprecated
+    public void spacesInObjectEntries(boolean b) {
+        _spacesInObjectEntries = b;
+    }
+
+    /**
+     * @since 2.3
+     */
+    public SingleLinePrettyPrinter withArrayIndenter(Indenter i) {
+        if (i == null) {
+            i = NopIndenter.instance;
+        }
+        if (_arrayIndenter == i) {
+            return this;
+        }
+        SingleLinePrettyPrinter pp = new SingleLinePrettyPrinter(this);
+        pp._arrayIndenter = i;
+        return pp;
+    }
+
+    /**
+     * @since 2.3
+     */
+    public SingleLinePrettyPrinter withObjectIndenter(Indenter i) {
+        if (i == null) {
+            i = NopIndenter.instance;
+        }
+        if (_objectIndenter == i) {
+            return this;
+        }
+        SingleLinePrettyPrinter pp = new SingleLinePrettyPrinter(this);
+        pp._objectIndenter = i;
+        return pp;
+    }
+
+    /**
+     * "Mutant factory" method that will return a pretty printer instance
+     * that does use spaces inside object entries; if 'this' instance already
+     * does this, it is returned; if not, a new instance will be constructed
+     * and returned.
+     *
+     * @since 2.3
+     */
+    public SingleLinePrettyPrinter withSpacesInObjectEntries() {
+        return _withSpaces(true);
+    }
+
+    /**
+     * "Mutant factory" method that will return a pretty printer instance
+     * that does not use spaces inside object entries; if 'this' instance already
+     * does this, it is returned; if not, a new instance will be constructed
+     * and returned.
+     *
+     * @since 2.3
+     */
+    public SingleLinePrettyPrinter withoutSpacesInObjectEntries() {
+        return _withSpaces(false);
+    }
+
+    protected SingleLinePrettyPrinter _withSpaces(boolean state) {
+        if (_spacesInObjectEntries == state) {
+            return this;
+        }
+        SingleLinePrettyPrinter pp = new SingleLinePrettyPrinter(this);
+        pp._spacesInObjectEntries = state;
+        return pp;
+    }
+
+    /*
+    /**********************************************************
+    /* Instantiatable impl
+    /**********************************************************
+     */
+
+    @Override
+    public SingleLinePrettyPrinter createInstance() {
+        return new SingleLinePrettyPrinter(this);
+    }
+
+    /*
+    /**********************************************************
+    /* PrettyPrinter impl
+    /**********************************************************
+     */
+
+    @Override
+    public void writeRootValueSeparator(JsonGenerator jg) throws IOException {
+        if (_rootSeparator != null) {
+            jg.writeRaw(_rootSeparator);
+        }
+    }
+
+    @Override
+    public void writeStartObject(JsonGenerator jg) throws IOException {
+        jg.writeRaw('{');
+        ++_nesting;
+    }
+
+    @Override
+    public void beforeObjectEntries(JsonGenerator jg) throws IOException {
+        _objectIndenter.writeIndentation(jg, _nesting);
+    }
+
+    /**
+     * Method called after an object field has been output, but
+     * before the value is output.
+     * <p>
+     * Default handling (without pretty-printing) will output a single
+     * colon to separate the two. Pretty-printer is
+     * to output a colon as well, but can surround that with other
+     * (white-space) decoration.
+     */
+    @Override
+    public void writeObjectFieldValueSeparator(JsonGenerator jg) throws IOException {
+        if (_spacesInObjectEntries) {
+            jg.writeRaw(": ");
+        } else {
+            jg.writeRaw(':');
+        }
+    }
+
+    /**
+     * Method called after an object entry (field:value) has been completely
+     * output, and before another value is to be output.
+     * <p>
+     * Default handling (without pretty-printing) will output a single
+     * comma to separate the two. Pretty-printer is
+     * to output a comma as well, but can surround that with other
+     * (white-space) decoration.
+     */
+    @Override
+    public void writeObjectEntrySeparator(JsonGenerator jg) throws IOException {
+        jg.writeRaw(',');
+        _objectIndenter.writeIndentation(jg, _nesting);
+    }
+
+    @Override
+    public void writeEndObject(JsonGenerator jg, int nrOfEntries) throws IOException {
+        --_nesting;
+        if (nrOfEntries > 1) {
+            _objectIndenter.writeIndentation(jg, _nesting);
+        } else {
+            jg.writeRaw(' ');
+        }
+        jg.writeRaw('}');
+    }
+
+    @Override
+    public void writeStartArray(JsonGenerator jg) throws IOException {
+        ++_nesting;
+        jg.writeRaw('[');
+    }
+
+    @Override
+    public void beforeArrayValues(JsonGenerator jg) throws IOException {
+        _arrayIndenter.writeIndentation(jg, _nesting);
+    }
+
+    /**
+     * Method called after an array value has been completely
+     * output, and before another value is to be output.
+     * <p>
+     * Default handling (without pretty-printing) will output a single
+     * comma to separate the two. Pretty-printer is
+     * to output a comma as well, but can surround that with other
+     * (white-space) decoration.
+     */
+    @Override
+    public void writeArrayValueSeparator(JsonGenerator gen) throws IOException {
+        gen.writeRaw(',');
+        _arrayIndenter.writeIndentation(gen, _nesting);
+    }
+
+    @Override
+    public void writeEndArray(JsonGenerator gen, int nrOfValues) throws IOException {
+        --_nesting;
+
+        if (_nesting == 0) {
+            gen.writeRaw('\n');
+        }
+        if (nrOfValues > 1) {
+            _arrayIndenter.writeIndentation(gen, _nesting);
+        } else {
+            gen.writeRaw(' ');
+        }
+        gen.writeRaw(']');
+    }
+
+    /*
+    /**********************************************************
+    /* Helper classes
+    /**********************************************************
+     */
+
+    /**
+     * Dummy implementation that adds no indentation whatsoever
+     */
+    public static class NopIndenter implements Indenter, java.io.Serializable {
+        public static final NopIndenter instance = new NopIndenter();
+
+        @Override
+        public void writeIndentation(JsonGenerator jg, int level) throws IOException {
+        }
+
+        @Override
+        public boolean isInline() {
+            return true;
+        }
+    }
+
+    /**
+     * This is a very simple indenter that only adds a
+     * single space for indentation. It is used as the default
+     * indenter for array values.
+     */
+    public static class FixedSpaceIndenter extends NopIndenter {
+        @SuppressWarnings("hiding")
+        public static final FixedSpaceIndenter instance = new FixedSpaceIndenter();
+
+        @Override
+        public void writeIndentation(JsonGenerator jg, int level) throws IOException {
+            jg.writeRaw(' ');
+        }
+
+        @Override
+        public boolean isInline() {
+            return true;
+        }
+    }
+}
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
index bfe0e33..07a7cc5 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
@@ -31,18 +31,20 @@
 import java.lang.reflect.Method;
 import java.net.Inet4Address;
 import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.concurrent.TimeUnit;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.*;
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.utils.ServletUtil.Servlets;
 import org.apache.asterix.test.base.ComparisonException;
@@ -67,9 +69,7 @@
 import org.apache.http.impl.client.StandardHttpRequestRetryHandler;
 import org.apache.http.util.EntityUtils;
 import org.apache.hyracks.util.StorageUtil;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class TestExecutor {
 
@@ -398,9 +398,10 @@
             try {
                 // First try to parse the response for a JSON error response.
 
-                JSONObject result = new JSONObject(errorBody);
-                String[] errors = { result.getJSONArray("error-code").getString(0), result.getString("summary"),
-                        result.getString("stacktrace") };
+                ObjectMapper om = new ObjectMapper();
+                JsonNode result = om.readTree(errorBody);
+                String[] errors = { result.get("error-code").asText(), result.get("summary").asText(),
+                        result.get("stacktrace").asText() };
                 GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, errors[2]);
                 exceptionMsg = "HTTP operation failed: " + errors[0] + "\nSTATUS LINE: " + httpResponse.getStatusLine()
                         + "\nSUMMARY: " + errors[1] + "\nSTACKTRACE: " + errors[2];
@@ -540,15 +541,16 @@
             throw new NullPointerException("Statement parameter required.");
         }
         RequestBuilder builder = RequestBuilder.post(endpoint);
-        JSONObject content = new JSONObject();
-        try {
-            for (CompilationUnit.Parameter param : injectStatement(statement, stmtParam, otherParams)) {
-                content.put(param.getName(), param.getValue());
-            }
-        } catch (JSONException e) {
-            throw new IllegalArgumentException("Request object construction failed.", e);
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode content = om.createObjectNode();
+        for (CompilationUnit.Parameter param : injectStatement(statement, stmtParam, otherParams)) {
+            content.put(param.getName(), param.getValue());
         }
-        builder.setEntity(new StringEntity(content.toString(), ContentType.APPLICATION_JSON));
+        try {
+            builder.setEntity(new StringEntity(om.writeValueAsString(content), ContentType.APPLICATION_JSON));
+        } catch (JsonProcessingException e) {
+            e.printStackTrace();
+        }
         builder.setCharset(StandardCharsets.UTF_8);
         return builder.build();
     }
@@ -1024,11 +1026,11 @@
         StringWriter actual = new StringWriter();
         IOUtils.copy(executeJSONGet, actual, StandardCharsets.UTF_8);
         String config = actual.toString();
-        String nodePid = StringUtils.substringBetween(config, "\"pid\": ", ",").trim();
-        if (nodePid == null) {
-            throw new IllegalArgumentException("Coud not find process for node id: " + nodeId);
+        int nodePid = new ObjectMapper().readValue(config, ObjectNode.class).get("pid").asInt();
+        if (nodePid <= 1) {
+            throw new IllegalArgumentException("Could not retrieve node pid from admin API");
         }
-        ProcessBuilder pb = new ProcessBuilder("kill", "-9", nodePid);
+        ProcessBuilder pb = new ProcessBuilder("kill", "-9", Integer.toString(nodePid));
         pb.start().waitFor();
     }
 
@@ -1122,15 +1124,22 @@
             ArrayList<String> toBeDropped = new ArrayList<>();
             InputStream resultStream = executeQueryService("select dv.DataverseName from Metadata.`Dataverse` as dv;",
                     getEndpoint(Servlets.QUERY_SERVICE));
-            resultStream = ResultExtractor.extract(resultStream);
-            StringWriter sw = new StringWriter();
-            IOUtils.copy(resultStream, sw, StandardCharsets.UTF_8.name());
-            JSONArray result = new JSONArray(sw.toString());
-            for (int i = 0; i < result.length(); ++i) {
-                JSONObject json = result.getJSONObject(i);
-                String dvName = json.getString("DataverseName");
-                if (!dvName.equals("Metadata") && !dvName.equals("Default")) {
-                    toBeDropped.add(dvName);
+            String out = IOUtils.toString(resultStream);
+            ObjectMapper om = new ObjectMapper();
+            om.setConfig(om.getDeserializationConfig().with(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT));
+            JsonNode result;
+            try {
+                result = om.readValue(out, ObjectNode.class).get("results");
+            } catch (JsonMappingException e) {
+                result = om.createArrayNode();
+            }
+            for (int i = 0; i < result.size(); i++) {
+                JsonNode json = result.get(i);
+                if (json != null) {
+                    String dvName = json.get("DataverseName").asText();
+                    if (!dvName.equals("Metadata") && !dvName.equals("Default")) {
+                        toBeDropped.add(dvName);
+                    }
                 }
             }
             if (!toBeDropped.isEmpty()) {
@@ -1151,4 +1160,5 @@
             throw th;
         }
     }
+
 }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/message/EndFeedMessage.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/message/EndFeedMessage.java
index 06aafdd..7a3a376 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/message/EndFeedMessage.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/message/EndFeedMessage.java
@@ -18,12 +18,13 @@
  */
 package org.apache.asterix.external.feed.message;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.active.EntityId;
 import org.apache.asterix.external.feed.management.FeedConnectionId;
 import org.apache.asterix.external.util.FeedConstants;
 import org.apache.asterix.external.util.FeedUtils.FeedRuntimeType;
-import org.json.JSONException;
-import org.json.JSONObject;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 /**
  * @deprecated A feed control message indicating the need to end the feed. This message is dispatched
@@ -82,8 +83,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject obj = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode obj = om.createObjectNode();
         obj.put(FeedConstants.MessageConstants.MESSAGE_TYPE, messageType.name());
         obj.put(FeedConstants.MessageConstants.DATAVERSE, connectionId.getFeedId().getDataverse());
         obj.put(FeedConstants.MessageConstants.FEED, connectionId.getFeedId().getEntityName());
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java
index d23d490..95a5cd1 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java
@@ -18,20 +18,20 @@
  */
 package org.apache.asterix.external.parser;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.builders.AbvsBuilderFactory;
 import org.apache.asterix.builders.IARecordBuilder;
 import org.apache.asterix.builders.IAsterixListBuilder;
 import org.apache.asterix.builders.ListBuilderFactory;
-import org.apache.asterix.builders.OrderedListBuilder;
 import org.apache.asterix.builders.RecordBuilderFactory;
+import org.apache.asterix.builders.UnorderedListBuilder;
 import org.apache.asterix.external.api.IRawRecord;
 import org.apache.asterix.external.api.IRecordDataParser;
 import org.apache.asterix.om.base.AMutablePoint;
 import org.apache.asterix.om.base.ANull;
-import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.util.container.IObjectPool;
@@ -40,12 +40,10 @@
 import org.apache.hyracks.data.std.api.IMutableValueStorage;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 import org.apache.hyracks.util.string.UTF8StringWriter;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 import java.io.DataOutput;
 import java.io.IOException;
+import java.util.Iterator;
 
 public class TweetParser extends AbstractDataParser implements IRecordDataParser<String> {
     private final IObjectPool<IARecordBuilder, ATypeTag> recordBuilderPool = new ListObjectPool<>(
@@ -62,121 +60,85 @@
         aPoint = new AMutablePoint(0, 0);
     }
 
-    private void parseJSONArray(JSONArray jArray, DataOutput output, AOrderedListType orderedListType)
-            throws IOException, JSONException {
+    private void parseUnorderedList(JsonNode jArray, DataOutput output) throws IOException {
         ArrayBackedValueStorage itemBuffer = getTempBuffer();
-        OrderedListBuilder orderedList = (OrderedListBuilder) getOrderedListBuilder();
+        UnorderedListBuilder unorderedListBuilder = (UnorderedListBuilder) getUnorderedListBuilder();
 
-        orderedList.reset(orderedListType);
-        for (int iter1 = 0; iter1 < jArray.length(); iter1++) {
+        unorderedListBuilder.reset(null);
+        for (int iter1 = 0; iter1 < jArray.size(); iter1++) {
             itemBuffer.reset();
-            if (writeField(jArray.get(iter1), orderedListType == null ? null : orderedListType.getItemType(),
-                    itemBuffer.getDataOutput())) {
-                orderedList.addItem(itemBuffer);
+            if (writeField(jArray.get(iter1), null, itemBuffer.getDataOutput())) {
+                unorderedListBuilder.addItem(itemBuffer);
             }
         }
-        orderedList.write(output, true);
+        unorderedListBuilder.write(output, true);
     }
 
-    private boolean writeFieldWithFieldType(Object fieldObj, IAType fieldType, DataOutput out)
-            throws HyracksDataException {
+    private boolean writeField(JsonNode fieldObj, IAType fieldType, DataOutput out) throws IOException {
         boolean writeResult = true;
-        IAType chkFieldType;
-        chkFieldType = fieldType instanceof AUnionType ? ((AUnionType) fieldType).getActualType() : fieldType;
-        try {
-            switch (chkFieldType.getTypeTag()) {
+        if (fieldType != null) {
+            switch (fieldType.getTypeTag()) {
                 case STRING:
-                    out.write(fieldType.getTypeTag().serialize());
-                    utf8Writer.writeUTF8(fieldObj.toString(), out);
+                    out.write(BuiltinType.ASTRING.getTypeTag().serialize());
+                    utf8Writer.writeUTF8(fieldObj.asText(), out);
                     break;
                 case INT64:
-                    out.write(fieldType.getTypeTag().serialize());
-                    if (fieldObj instanceof Integer) {
-                        out.writeLong(((Integer) fieldObj).longValue());
-                    } else {
-                        out.writeLong((Long) fieldObj);
-                    }
+                    aInt64.setValue(fieldObj.asLong());
                     int64Serde.serialize(aInt64, out);
                     break;
                 case INT32:
-                    out.write(fieldType.getTypeTag().serialize());
-                    out.writeInt((Integer) fieldObj);
+                    out.write(BuiltinType.AINT32.getTypeTag().serialize());
+                    out.writeInt(fieldObj.asInt());
                     break;
                 case DOUBLE:
-                    out.write(fieldType.getTypeTag().serialize());
-                    out.writeDouble((Double) fieldObj);
+                    out.write(BuiltinType.ADOUBLE.getTypeTag().serialize());
+                    out.writeDouble(fieldObj.asDouble());
                     break;
                 case BOOLEAN:
-                    out.write(fieldType.getTypeTag().serialize());
-                    out.writeBoolean((Boolean) fieldObj);
+                    out.write(BuiltinType.ABOOLEAN.getTypeTag().serialize());
+                    out.writeBoolean(fieldObj.asBoolean());
                     break;
                 case RECORD:
-                    if (((JSONObject) fieldObj).length() != 0) {
-                        writeResult = writeRecord((JSONObject) fieldObj, out, (ARecordType) chkFieldType);
-                    } else {
-                        writeResult = false;
-                    }
-                    break;
-                case ORDEREDLIST:
-                    if (((JSONArray) fieldObj).length() != 0) {
-                        parseJSONArray((JSONArray) fieldObj, out, (AOrderedListType) chkFieldType);
-                    } else {
-                        writeResult = false;
-                    }
+                    writeRecord(fieldObj, out, (ARecordType) fieldType);
                     break;
                 default:
                     writeResult = false;
             }
-        } catch (IOException | JSONException e) {
-            throw new HyracksDataException(e);
-        }
-        return writeResult;
-    }
-
-    private boolean writeFieldWithoutFieldType(Object fieldObj, DataOutput out) throws HyracksDataException {
-        boolean writeResult = true;
-        try {
-            if (fieldObj == JSONObject.NULL) {
+        } else {
+            if (fieldObj.isNull()) {
                 nullSerde.serialize(ANull.NULL, out);
-            } else if (fieldObj instanceof Integer) {
+            } else if (fieldObj.isInt()) {
                 out.write(BuiltinType.AINT32.getTypeTag().serialize());
-                out.writeInt((Integer) fieldObj);
-            } else if (fieldObj instanceof Boolean) {
+                out.writeInt(fieldObj.asInt());
+            } else if (fieldObj.isBoolean()) {
                 out.write(BuiltinType.ABOOLEAN.getTypeTag().serialize());
-                out.writeBoolean((Boolean) fieldObj);
-            } else if (fieldObj instanceof Double) {
+                out.writeBoolean(fieldObj.asBoolean());
+            } else if (fieldObj.isDouble()) {
                 out.write(BuiltinType.ADOUBLE.getTypeTag().serialize());
-                out.writeDouble((Double) fieldObj);
-            } else if (fieldObj instanceof Long) {
+                out.writeDouble(fieldObj.asDouble());
+            } else if (fieldObj.isLong()) {
                 out.write(BuiltinType.AINT64.getTypeTag().serialize());
-                out.writeLong((Long) fieldObj);
-            } else if (fieldObj instanceof String) {
+                out.writeLong(fieldObj.asLong());
+            } else if (fieldObj.isTextual()) {
                 out.write(BuiltinType.ASTRING.getTypeTag().serialize());
-                utf8Writer.writeUTF8((String) fieldObj, out);
-            } else if (fieldObj instanceof JSONArray) {
-                if (((JSONArray) fieldObj).length() != 0) {
-                    parseJSONArray((JSONArray) fieldObj, out, null);
+                utf8Writer.writeUTF8(fieldObj.asText(), out);
+            } else if (fieldObj.isArray()) {
+                if ((fieldObj).size() != 0) {
+                    parseUnorderedList(fieldObj, out);
                 } else {
                     writeResult = false;
                 }
-            } else if (fieldObj instanceof JSONObject) {
-                if (((JSONObject) fieldObj).length() != 0) {
-                    writeResult = writeRecord((JSONObject) fieldObj, out, null);
+            } else if (fieldObj.isObject()) {
+                if ((fieldObj).size() != 0) {
+                    writeRecord(fieldObj, out, null);
                 } else {
                     writeResult = false;
                 }
             }
-        } catch (IOException | JSONException e) {
-            throw new HyracksDataException(e);
         }
         return writeResult;
     }
 
-    private boolean writeField(Object fieldObj, IAType fieldType, DataOutput out) throws HyracksDataException {
-        return fieldType == null ? writeFieldWithoutFieldType(fieldObj, out)
-                : writeFieldWithFieldType(fieldObj, fieldType, out);
-    }
-
     private int checkAttrNameIdx(String[] nameList, String name) {
         int idx = 0;
         if (nameList != null) {
@@ -190,13 +152,11 @@
         return -1;
     }
 
-    public boolean writeRecord(JSONObject obj, DataOutput out, ARecordType curRecType)
-            throws IOException, JSONException {
+    public void writeRecord(JsonNode obj, DataOutput out, ARecordType curRecType) throws IOException {
         IAType[] curTypes = null;
         String[] curFNames = null;
         int fieldN;
         int attrIdx;
-        boolean writeRecord = false;
 
         ArrayBackedValueStorage fieldValueBuffer = getTempBuffer();
         ArrayBackedValueStorage fieldNameBuffer = getTempBuffer();
@@ -216,9 +176,8 @@
             for (int iter1 = 0; iter1 < fieldN; iter1++) {
                 fieldValueBuffer.reset();
                 DataOutput fieldOutput = fieldValueBuffer.getDataOutput();
-                if (obj.isNull(curFNames[iter1])) {
-                    if (curRecType.getFieldType(curFNames[iter1]) != null
-                            && !(curRecType.getFieldType(curFNames[iter1]) instanceof AUnionType)) {
+                if (obj.get(curFNames[iter1]).isNull()) {
+                    if (curRecType.isClosedField(curFNames[iter1])) {
                         throw new HyracksDataException("Closed field " + curFNames[iter1] + " has null value.");
                     } else {
                         continue;
@@ -226,15 +185,18 @@
                 } else {
                     if (writeField(obj.get(curFNames[iter1]), curTypes[iter1], fieldOutput)) {
                         recBuilder.addField(iter1, fieldValueBuffer);
-                        writeRecord = true;
                     }
                 }
             }
         } else {
             //open record type
+            int closedFieldCount = 0;
             IAType curFieldType = null;
-            for (String attrName : JSONObject.getNames(obj)) {
-                if (obj.isNull(attrName) || obj.length() == 0) {
+            String attrName;
+            Iterator<String> iter = obj.fieldNames();
+            while (iter.hasNext()) {
+                attrName = iter.next();
+                if (obj.get(attrName).isNull() || obj.size() == 0) {
                     continue;
                 }
                 attrIdx = checkAttrNameIdx(curFNames, attrName);
@@ -245,29 +207,29 @@
                 fieldNameBuffer.reset();
                 DataOutput fieldOutput = fieldValueBuffer.getDataOutput();
                 if (writeField(obj.get(attrName), curFieldType, fieldOutput)) {
-                    writeRecord = true;
                     if (attrIdx == -1) {
                         aString.setValue(attrName);
                         stringSerde.serialize(aString, fieldNameBuffer.getDataOutput());
                         recBuilder.addField(fieldNameBuffer, fieldValueBuffer);
                     } else {
                         recBuilder.addField(attrIdx, fieldValueBuffer);
+                        closedFieldCount++;
                     }
                 }
             }
+            if (curRecType != null && closedFieldCount < curFNames.length) {
+                throw new HyracksDataException("Non-null field is null");
+            }
         }
-        if (writeRecord) {
-            recBuilder.write(out, true);
-        }
-        return writeRecord;
+        recBuilder.write(out, true);
     }
 
     private IARecordBuilder getRecordBuilder() {
         return recordBuilderPool.allocate(ATypeTag.RECORD);
     }
 
-    private IAsterixListBuilder getOrderedListBuilder() {
-        return listBuilderPool.allocate(ATypeTag.ORDEREDLIST);
+    private IAsterixListBuilder getUnorderedListBuilder() {
+        return listBuilderPool.allocate(ATypeTag.UNORDEREDLIST);
     }
 
     private ArrayBackedValueStorage getTempBuffer() {
@@ -279,9 +241,9 @@
         try {
             //TODO get rid of this temporary json
             resetPools();
-            JSONObject jsObj = new JSONObject(record.get());
-            writeRecord(jsObj, out, recordType);
-        } catch (JSONException | IOException e) {
+            ObjectMapper om = new ObjectMapper();
+            writeRecord(om.readTree(record.get()), out, recordType);
+        } catch (IOException e) {
             throw new HyracksDataException(e);
         }
     }
diff --git a/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm b/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm
index b155305..579caac 100644
--- a/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm
+++ b/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm
@@ -1,10 +1,34 @@
 {
-    "metadata_node": "asterix_nc1",
-    "partitions": {
-        "0": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc1",
-        "1": "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc1",
-        "2": "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-        "3": "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
+  "metadata_node" : "asterix_nc1",
+  "partitions" : {
+    "0" : {
+      "partitionId" : 0,
+      "nodeId" : "asterix_nc1",
+      "activeNodeId" : "asterix_nc1",
+      "active" : true,
+      "iodeviceNum" : 0
     },
-    "state": "ACTIVE"
+    "1" : {
+      "partitionId" : 1,
+      "nodeId" : "asterix_nc1",
+      "activeNodeId" : "asterix_nc1",
+      "active" : true,
+      "iodeviceNum" : 1
+    },
+    "2" : {
+      "partitionId" : 2,
+      "nodeId" : "asterix_nc2",
+      "activeNodeId" : "asterix_nc2",
+      "active" : true,
+      "iodeviceNum" : 0
+    },
+    "3" : {
+      "partitionId" : 3,
+      "nodeId" : "asterix_nc2",
+      "activeNodeId" : "asterix_nc2",
+      "active" : true,
+      "iodeviceNum" : 1
+    }
+  },
+  "state" : "ACTIVE"
 }
\ No newline at end of file
diff --git a/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm b/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm
index 6b31475..5f58ff7 100644
--- a/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm
+++ b/asterixdb/asterix-installer/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm
@@ -1,10 +1,34 @@
 {
-    "metadata_node": "asterix_nc2",
-    "partitions": {
-        "0": "ID:0, Original Node: asterix_nc1, IODevice: 0, Active Node: asterix_nc2",
-        "1": "ID:1, Original Node: asterix_nc1, IODevice: 1, Active Node: asterix_nc2",
-        "2": "ID:2, Original Node: asterix_nc2, IODevice: 0, Active Node: asterix_nc2",
-        "3": "ID:3, Original Node: asterix_nc2, IODevice: 1, Active Node: asterix_nc2"
+  "metadata_node" : "asterix_nc2",
+  "partitions" : {
+    "0" : {
+      "partitionId" : 0,
+      "nodeId" : "asterix_nc1",
+      "activeNodeId" : "asterix_nc2",
+      "active" : true,
+      "iodeviceNum" : 0
     },
-    "state": "ACTIVE"
+    "1" : {
+      "partitionId" : 1,
+      "nodeId" : "asterix_nc1",
+      "activeNodeId" : "asterix_nc2",
+      "active" : true,
+      "iodeviceNum" : 1
+    },
+    "2" : {
+      "partitionId" : 2,
+      "nodeId" : "asterix_nc2",
+      "activeNodeId" : "asterix_nc2",
+      "active" : true,
+      "iodeviceNum" : 0
+    },
+    "3" : {
+      "partitionId" : 3,
+      "nodeId" : "asterix_nc2",
+      "activeNodeId" : "asterix_nc2",
+      "active" : true,
+      "iodeviceNum" : 1
+    }
+  },
+  "state" : "ACTIVE"
 }
\ No newline at end of file
diff --git a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml
index dccbcb1..2fa86b4 100644
--- a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml
+++ b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml
@@ -48,9 +48,12 @@
       <version>2.2.1</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <type>jar</type>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
   </dependencies>
 </project>
diff --git a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordManagerGeneratorMojo.java b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordManagerGeneratorMojo.java
index d7479bc..909edc3 100644
--- a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordManagerGeneratorMojo.java
+++ b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordManagerGeneratorMojo.java
@@ -33,7 +33,6 @@
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.json.JSONException;
 
 /**
  * @goal generate-record-manager
@@ -95,8 +94,6 @@
                 type.addToMap(typeMap);
             } catch (FileNotFoundException fnfe) {
                 throw new MojoExecutionException("could not find type description file " + inputFiles[i], fnfe);
-            } catch (JSONException jse) {
-                throw new MojoExecutionException("could not parse type description file " + inputFiles[i], jse);
             } catch (IOException e) {
                 throw new MojoExecutionException("error closing type description file " + inputFiles[i], e);
             }
diff --git a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordType.java b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordType.java
index 6702a8f..d322371 100644
--- a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordType.java
+++ b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/org/apache/asterix/recordmanagergenerator/RecordType.java
@@ -19,26 +19,41 @@
 
 package org.apache.asterix.recordmanagergenerator;
 
+import java.io.IOException;
 import java.io.Reader;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Map;
 
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.json.JSONTokener;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class RecordType {
 
     enum Type {
-        BYTE  (1, "byte",  "get",      "put",      "(byte)0xde",          "TypeUtil.Byte.append",   "TypeUtil.Byte.appendFixed"),
-        SHORT (2, "short", "getShort", "putShort", "(short)0xdead",       "TypeUtil.Short.append",  "TypeUtil.Short.appendFixed"),
-        INT   (4, "int",   "getInt",   "putInt",   "0xdeadbeef",          "TypeUtil.Int.append",    "TypeUtil.Int.appendFixed"),
-        GLOBAL(8, "long",  "getLong",  "putLong",  "0xdeadbeefdeadbeefl", "TypeUtil.Global.append", "TypeUtil.Global.appendFixed");
+        BYTE(1, "byte", "get", "put", "(byte)0xde", "TypeUtil.Byte.append", "TypeUtil.Byte.appendFixed"),
+        SHORT(
+                2,
+                "short",
+                "getShort",
+                "putShort",
+                "(short)0xdead",
+                "TypeUtil.Short.append",
+                "TypeUtil.Short.appendFixed"),
+        INT(4, "int", "getInt", "putInt", "0xdeadbeef", "TypeUtil.Int.append", "TypeUtil.Int.appendFixed"),
+        GLOBAL(
+                8,
+                "long",
+                "getLong",
+                "putLong",
+                "0xdeadbeefdeadbeefl",
+                "TypeUtil.Global.append",
+                "TypeUtil.Global.appendFixed");
 
-        Type(int size, String javaType, String bbGetter, String bbSetter, String deadMemInitializer, String appender, String tabAppender) {
+        Type(int size, String javaType, String bbGetter, String bbSetter, String deadMemInitializer, String appender,
+                String tabAppender) {
             this.size = size;
             this.javaType = javaType;
             this.bbGetter = bbGetter;
@@ -73,10 +88,10 @@
             this.accessible = accessible;
         }
 
-        public static Field fromJSON(JSONObject obj) throws JSONException {
-            String name = obj.getString("name");
-            Type type = parseType(obj.getString("type"));
-            String initial = obj.optString("initial", null);
+        public static Field fromJSON(JsonNode obj) {
+            String name = obj.get("name").asText();
+            Type type = parseType(obj.get("type").asText());
+            String initial = obj.get("initial") == null ? null : obj.get("initial").asText();
             return new Field(name, type, initial, -1, true);
         }
 
@@ -96,7 +111,7 @@
 
         String methodName(String prefix) {
             String words[] = name.split(" ");
-            assert(words.length > 0);
+            assert words.length > 0;
             StringBuilder sb = new StringBuilder(prefix);
             for (int j = 0; j < words.length; ++j) {
                 String word = words[j];
@@ -108,11 +123,8 @@
 
         StringBuilder appendMemoryManagerGetMethod(StringBuilder sb, String indent, int level) {
             sb = indent(sb, indent, level);
-            sb.append("public ")
-              .append(type.javaType)
-              .append(' ')
-              .append(methodName("get"))
-              .append("(int slotNum) {\n");
+            sb.append("public ").append(type.javaType).append(' ').append(methodName("get"))
+                    .append("(int slotNum) {\n");
             sb = indent(sb, indent, level + 1);
             sb.append("final Buffer buf = buffers.get(slotNum / NO_SLOTS);\n");
             sb = indent(sb, indent, level + 1);
@@ -120,11 +132,8 @@
             sb = indent(sb, indent, level + 1);
             sb.append("final ByteBuffer b = buf.bb;\n");
             sb = indent(sb, indent, level + 1);
-            sb.append("return b.")
-              .append(type.bbGetter)
-              .append("((slotNum % NO_SLOTS) * ITEM_SIZE + ")
-              .append(offsetName())
-              .append(");\n");
+            sb.append("return b.").append(type.bbGetter).append("((slotNum % NO_SLOTS) * ITEM_SIZE + ")
+                    .append(offsetName()).append(");\n");
             sb = indent(sb, indent, level);
             sb.append("}\n");
             return sb;
@@ -132,19 +141,13 @@
 
         StringBuilder appendMemoryManagerSetMethod(StringBuilder sb, String indent, int level) {
             sb = indent(sb, indent, level);
-            sb.append("public void ")
-              .append(methodName("set"))
-              .append("(int slotNum, ")
-              .append(type.javaType)
-              .append(" value) {\n");
+            sb.append("public void ").append(methodName("set")).append("(int slotNum, ").append(type.javaType)
+                    .append(" value) {\n");
             sb = indent(sb, indent, level + 1);
             sb.append("final ByteBuffer b = buffers.get(slotNum / NO_SLOTS).bb;\n");
             sb = indent(sb, indent, level + 1);
-            sb.append("b.")
-              .append(type.bbSetter)
-              .append("((slotNum % NO_SLOTS) * ITEM_SIZE + ")
-              .append(offsetName())
-              .append(", value);\n");
+            sb.append("b.").append(type.bbSetter).append("((slotNum % NO_SLOTS) * ITEM_SIZE + ").append(offsetName())
+                    .append(", value);\n");
             sb = indent(sb, indent, level);
             sb.append("}\n");
             return sb;
@@ -152,23 +155,18 @@
 
         StringBuilder appendArenaManagerGetMethod(StringBuilder sb, String indent, int level) {
             sb = indent(sb, indent, level);
-            sb.append("public ")
-              .append(type.javaType)
-              .append(' ')
-              .append(methodName("get"))
-              .append("(long slotNum) {\n");
+            sb.append("public ").append(type.javaType).append(' ').append(methodName("get"))
+                    .append("(long slotNum) {\n");
             if (initial != null) {
-              sb = indent(sb, indent, level + 1);
-              sb.append("if (TRACK_ALLOC_ID) checkAllocId(slotNum);\n");
+                sb = indent(sb, indent, level + 1);
+                sb.append("if (TRACK_ALLOC_ID) checkAllocId(slotNum);\n");
             }
             sb = indent(sb, indent, level + 1);
             sb.append("final int arenaId = TypeUtil.Global.arenaId(slotNum);\n");
             sb = indent(sb, indent, level + 1);
             sb.append("final int localId = TypeUtil.Global.localId(slotNum);\n");
             sb = indent(sb, indent, level + 1);
-            sb.append("return get(arenaId).")
-              .append(methodName("get"))
-              .append("(localId);\n");
+            sb.append("return get(arenaId).").append(methodName("get")).append("(localId);\n");
             sb = indent(sb, indent, level);
             sb.append("}\n");
             return sb;
@@ -176,23 +174,18 @@
 
         StringBuilder appendArenaManagerSetMethod(StringBuilder sb, String indent, int level) {
             sb = indent(sb, indent, level);
-            sb.append("public void ")
-              .append(methodName("set"))
-              .append("(long slotNum, ")
-              .append(type.javaType)
-              .append(" value) {\n");
+            sb.append("public void ").append(methodName("set")).append("(long slotNum, ").append(type.javaType)
+                    .append(" value) {\n");
             if (initial != null) {
-              sb = indent(sb, indent, level + 1);
-              sb.append("if (TRACK_ALLOC_ID) checkAllocId(slotNum);\n");
+                sb = indent(sb, indent, level + 1);
+                sb.append("if (TRACK_ALLOC_ID) checkAllocId(slotNum);\n");
             }
             sb = indent(sb, indent, level + 1);
             sb.append("final int arenaId = TypeUtil.Global.arenaId(slotNum);\n");
             sb = indent(sb, indent, level + 1);
             sb.append("final int localId = TypeUtil.Global.localId(slotNum);\n");
             sb = indent(sb, indent, level + 1);
-            sb.append("get(arenaId).")
-              .append(methodName("set"))
-              .append("(localId, value);\n");
+            sb.append("get(arenaId).").append(methodName("set")).append("(localId, value);\n");
             sb = indent(sb, indent, level);
             sb.append("}\n");
             return sb;
@@ -200,11 +193,7 @@
 
         StringBuilder appendInitializers(StringBuilder sb, String indent, int level) {
             sb = indent(sb, indent, level);
-            sb.append("bb.")
-              .append(type.bbSetter)
-              .append("(slotNum * ITEM_SIZE + ")
-              .append(offsetName())
-              .append(", ");
+            sb.append("bb.").append(type.bbSetter).append("(slotNum * ITEM_SIZE + ").append(offsetName()).append(", ");
             if (initial != null) {
                 sb.append(initial);
             } else {
@@ -219,17 +208,11 @@
                 return sb;
             }
             sb = indent(sb, indent, level);
-            sb.append("if (bb.")
-              .append(type.bbGetter)
-              .append("(itemOffset + ")
-              .append(offsetName())
-              .append(") == ")
-              .append(type.deadMemInitializer)
-              .append(") {\n");
+            sb.append("if (bb.").append(type.bbGetter).append("(itemOffset + ").append(offsetName()).append(") == ")
+                    .append(type.deadMemInitializer).append(") {\n");
             sb = indent(sb, indent, level + 1);
-            sb.append("String msg = \"invalid value in field ")
-              .append(offsetName())
-              .append(" of slot \" + TypeUtil.Global.toString(slotNum);\n");
+            sb.append("String msg = \"invalid value in field ").append(offsetName())
+                    .append(" of slot \" + TypeUtil.Global.toString(slotNum);\n");
             sb = indent(sb, indent, level + 1);
             sb.append("throw new IllegalStateException(msg);\n");
             sb = indent(sb, indent, level);
@@ -239,7 +222,7 @@
 
         String offsetName() {
             String words[] = name.split(" ");
-            assert(words.length > 0);
+            assert (words.length > 0);
             StringBuilder sb = new StringBuilder(words[0].toUpperCase());
             for (int j = 1; j < words.length; ++j) {
                 sb.append("_").append(words[j].toUpperCase());
@@ -271,18 +254,17 @@
         addField("next free slot", Type.INT, "-1", false);
     }
 
-    public static RecordType read(Reader reader) throws JSONException {
-        JSONTokener tok = new JSONTokener(reader);
-        JSONObject obj = new JSONObject(tok);
-        return fromJSON(obj);
+    public static RecordType read(Reader reader) throws IOException {
+        ObjectNode node = new ObjectMapper().readValue(reader, ObjectNode.class);
+        return fromJSON(node);
     }
 
-    public static RecordType fromJSON(JSONObject obj) throws JSONException {
-        RecordType result = new RecordType(obj.getString("name"));
-        JSONArray fields = obj.getJSONArray("fields");
-        for (int i = 0; i < fields.length(); ++i) {
-            JSONObject field = fields.getJSONObject(i);
-            result.fields.add(Field.fromJSON(field));
+    public static RecordType fromJSON(ObjectNode obj) {
+        RecordType result = new RecordType(obj.get("name").asText());
+        JsonNode fields = obj.get("fields");
+        for (int i = 0; i < fields.size(); i++) {
+            JsonNode n = fields.get(i);
+            result.fields.add(Field.fromJSON(n));
         }
         return result;
     }
@@ -298,7 +280,7 @@
     }
 
     private void addField(String name, Type type, String initial, boolean accessible) {
-        if (! modifiable) {
+        if (!modifiable) {
             throw new IllegalStateException("cannot modify type anmore");
         }
         fields.add(new Field(name, type, initial, -1, accessible));
@@ -319,7 +301,9 @@
             field.offset = totalSize;
             final int size = field.type.size;
             totalSize += size;
-            if (size > alignment) alignment = size;
+            if (size > alignment) {
+                alignment = size;
+            }
         }
         if (totalSize % alignment != 0) {
             totalSize = ((totalSize / alignment) + 1) * alignment;
@@ -340,17 +324,12 @@
 
     StringBuilder appendConstants(StringBuilder sb, String indent, int level) {
         sb = indent(sb, indent, level);
-        sb.append("public static int ITEM_SIZE = ")
-          .append(totalSize)
-          .append(";\n");
+        sb.append("public static int ITEM_SIZE = ").append(totalSize).append(";\n");
         for (int i = 0; i < fields.size(); ++i) {
             final Field field = fields.get(i);
             sb = indent(sb, indent, level);
-            sb.append("public static int ")
-              .append(field.offsetName())
-              .append(" = ")
-              .append(field.offset).append("; // size: ")
-              .append(field.type.size).append("\n");
+            sb.append("public static int ").append(field.offsetName()).append(" = ").append(field.offset)
+                    .append("; // size: ").append(field.type.size).append("\n");
         }
         return sb;
     }
@@ -366,22 +345,14 @@
         for (int i = 0; i < fields.size(); ++i) {
             final Field field = fields.get(i);
             sb = indent(sb, indent, level);
-            sb.append("sb.append(\"")
-              .append(padRight(field.name, maxNameWidth))
-              .append(" | \");\n");
+            sb.append("sb.append(\"").append(padRight(field.name, maxNameWidth)).append(" | \");\n");
             sb = indent(sb, indent, level);
             sb.append("for (int i = 0; i < NO_SLOTS; ++i) {\n");
             sb = indent(sb, indent, level + 1);
-            sb.append(field.type.javaType)
-              .append(" value = bb.")
-              .append(field.type.bbGetter)
-              .append("(i * ITEM_SIZE + ")
-              .append(field.offsetName())
-              .append(");\n");
+            sb.append(field.type.javaType).append(" value = bb.").append(field.type.bbGetter)
+                    .append("(i * ITEM_SIZE + ").append(field.offsetName()).append(");\n");
             sb = indent(sb, indent, level + 1);
-            sb.append("sb = ")
-              .append(field.type.tabAppender)
-              .append("(sb, value);\n");
+            sb.append("sb = ").append(field.type.tabAppender).append("(sb, value);\n");
             sb = indent(sb, indent, level + 1);
             sb.append("sb.append(\" | \");\n");
             sb = indent(sb, indent, level);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java
index b3ee50e..db87ce0 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java
@@ -18,13 +18,13 @@
  */
 package org.apache.asterix.om.base;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ABinary implements IAObject {
 
@@ -115,15 +115,16 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         int start = getStart();
-        JSONArray byteArray = new JSONArray();
+        ArrayNode byteArray = om.createArrayNode();
         for (int i = 0; i < getLength(); i++) {
-            byteArray.put(bytes[start + i]);
+            byteArray.add(bytes[start + i]);
         }
-        json.put("ABinary", byteArray);
+        json.set("ABinary", byteArray);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java
index 503c920..a15dbad 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java
@@ -18,9 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -139,14 +139,15 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONArray bitArray = new JSONArray();
+        ArrayNode bitArray = om.createArrayNode();
         for (int i = 0; i < intArray.length; i++) {
-            bitArray.put(intArray[i]);
+            bitArray.add(intArray[i]);
         }
-        json.put("ABitArray", bitArray);
+        json.set("ABitArray", bitArray);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java
index 2a56cff..a1011d8 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java
@@ -18,12 +18,12 @@
  */
 package org.apache.asterix.om.base;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public final class ABoolean implements IAObject {
 
@@ -80,7 +80,7 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        return new JSONObject().put("ABoolean", bVal);
+    public ObjectNode toJSON()  {
+        return new ObjectMapper().createObjectNode().put("ABoolean", bVal);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java
index a99bcda..4878d7a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java
@@ -18,8 +18,8 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -82,13 +82,14 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONObject circle = new JSONObject();
-        circle.put("center", center);
+        ObjectNode circle = om.createObjectNode();
+        circle.set("center", center.toJSON());
         circle.put("radius", radius);
-        json.put("ACircle", circle);
+        json.set("ACircle", circle);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java
index 789ad31..9373f90 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java
@@ -20,8 +20,8 @@
 
 import java.io.IOException;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
@@ -96,8 +96,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("ADate", chrononTimeInDay);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java
index f3592e3..75f653e 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java
@@ -20,13 +20,13 @@
 
 import java.io.IOException;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 /**
  * ADateTime type represents the timestamp values.
@@ -136,8 +136,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("ADateTime", chrononTime);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java
index cb298b7..d31b8c8 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -42,12 +43,13 @@
      * @see org.apache.hyracks.api.dataflow.value.JSONSerializable#toJSON()
      */
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONObject duration = new JSONObject();
+        ObjectNode duration = om.createObjectNode();
         duration.put("milliseconds", chrononInMillisecond);
-        json.put("ADuration", duration);
+        json.set("ADuration", duration);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java
index 4746773..7a2fe06 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -78,8 +79,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("ADouble", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java
index 27b551b..a3f23d3 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
@@ -117,13 +118,14 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONObject duration = new JSONObject();
+        ObjectNode duration = om.createObjectNode();
         duration.put("months", chrononInMonth);
         duration.put("milliseconds", chrononInMillisecond);
-        json.put("ADuration", duration);
+        json.set("ADuration", duration);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java
index 50d1825..f29e659 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -78,8 +79,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("AFloat", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java
index 11dd486..934ef0a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -68,8 +69,10 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("AInt16", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java
index 5bbcf77..38a87d7 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -93,8 +94,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("AInt32", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java
index 9047833..02bc8b0 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -67,8 +68,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("AInt64", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java
index 8360d99..5623d37 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -67,8 +68,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("AInt8", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java
index 5fa99a9..9dfaf3b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java
@@ -20,8 +20,7 @@
 
 import java.io.IOException;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
@@ -156,7 +155,7 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
+    public ObjectNode toJSON()  {
         // TODO(madhusudancs): Remove this method when a printer based JSON serializer is implemented.
         return null;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java
index 4908fa8..9134a3c 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java
@@ -18,8 +18,8 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -75,13 +75,14 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONObject line = new JSONObject();
-        line.put("p1", p1);
-        line.put("p2", p2);
-        json.put("ALine", line);
+        ObjectNode line = om.createObjectNode();
+        line.set("p1", p1.toJSON());
+        line.set("p2", p2.toJSON());
+        json.set("ALine", line);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
index 6c357e6..2455311 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
@@ -18,12 +18,12 @@
  */
 package org.apache.asterix.om.base;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 // This class represents a MISSING object.
 public class AMissing implements IAObject {
@@ -59,8 +59,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("AMissing", "missing");
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
index 859ebb3..ebf7975 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
@@ -19,12 +19,12 @@
 
 package org.apache.asterix.om.base;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ANull implements IAObject {
 
@@ -59,8 +59,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
         json.put("ANull", "null");
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java
index 7e67e0a..8138a51 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java
@@ -21,14 +21,14 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AOrderedList implements IACollection {
 
@@ -126,14 +126,15 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONArray list = new JSONArray();
+        ArrayNode list = om.createArrayNode();
         for (IAObject v : values) {
-            list.put(v.toJSON());
+            list.add(v.toJSON());
         }
-        json.put("AOrderedList", list);
+        json.set("AOrderedList", list);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java
index c1de289..a847cff 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java
@@ -18,8 +18,8 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -75,13 +75,13 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
-
-        JSONObject point = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
+        ObjectNode point = om.createObjectNode();
         point.put("x", x);
         point.put("y", y);
-        json.put("APoint", point);
+        json.set("APoint", point);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java
index 28b29e7..7b8ad94 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java
@@ -18,8 +18,8 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -81,14 +81,15 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONObject point = new JSONObject();
+        ObjectNode point = om.createObjectNode();
         point.put("x", x);
         point.put("y", y);
         point.put("z", z);
-        json.put("APoint3D", point);
+        json.set("APoint3D", point);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java
index 142c4a0..7a3a167 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java
@@ -18,9 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -95,14 +95,15 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONArray polygon = new JSONArray();
+        ArrayNode polygon = om.createArrayNode();
         for (int i = 0; i < points.length; i++) {
-            polygon.put(points[i].toJSON());
+            polygon.add(points[i].toJSON());
         }
-        json.put("APolygon", polygon);
+        json.set("APolygon", polygon);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
index c35f000..cda4d2b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
@@ -18,12 +18,13 @@
  */
 package org.apache.asterix.om.base;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class ARecord implements IAObject {
     public static final ARecord EMPTY_OPEN_RECORD = new ARecord(ARecordType.FULLY_OPEN_RECORD_TYPE, new IAObject[] {});
@@ -104,16 +105,17 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONArray record = new JSONArray();
+        ArrayNode record = om.createArrayNode();
         for (int i = 0; i < fields.length; i++) {
-            JSONObject item = new JSONObject();
-            item.put(type.getFieldNames()[i], fields[i]);
-            record.put(item);
+            ObjectNode item = om.createObjectNode();
+            item.set(type.getFieldNames()[i], fields[i].toJSON());
+            record.add(item);
         }
-        json.put("ARecord", record);
+        json.set("ARecord", record);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java
index 2bb780a..4bff3a8 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java
@@ -18,8 +18,8 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -75,13 +75,14 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONObject rectangle = new JSONObject();
-        rectangle.put("p1", p1);
-        rectangle.put("p2", p2);
-        json.put("ARectangle", rectangle);
+        ObjectNode rectangle = om.createObjectNode();
+        rectangle.set("p1", p1.toJSON());
+        rectangle.set("p2", p2.toJSON());
+        json.set("ARectangle", rectangle);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java
index a1a89fe..b0cedbc 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java
@@ -20,12 +20,13 @@
 
 import java.io.Serializable;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONException;
-import org.json.JSONObject;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AString implements IAObject, Serializable {
 
@@ -78,8 +79,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("AString", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java
index 7cc303e..2a9e6da 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java
@@ -20,8 +20,8 @@
 
 import java.io.IOException;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
@@ -112,8 +112,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("ATime", chrononTime);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java
index 025866c..2c7f531 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java
@@ -24,13 +24,13 @@
 import java.io.IOException;
 import java.util.Arrays;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AUUID implements IAObject {
 
@@ -57,8 +57,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
         json.put("AUUID", toString());
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java
index 8f19b7e..62043f2 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java
@@ -21,13 +21,13 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.AUnorderedListType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AUnorderedList implements IACollection {
 
@@ -117,14 +117,15 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONArray list = new JSONArray();
+        ArrayNode list = om.createArrayNode();
         for (IAObject v : values) {
-            list.put(v.toJSON());
+            list.add(v.toJSON());
         }
-        json.put("AUnorderedList", list);
+        json.set("AUnorderedList", list);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java
index 8fd21dc..ce8e7c5 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -50,12 +51,13 @@
      * @see org.apache.hyracks.api.dataflow.value.JSONSerializable#toJSON()
      */
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
-        JSONObject duration = new JSONObject();
+        ObjectNode duration = om.createObjectNode();
         duration.put("months", chrononInMonth);
-        json.put("ADuration", duration);
+        json.set("ADuration", duration);
 
         return json;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java
index e1206ac..b600995 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java
@@ -18,8 +18,8 @@
  */
 package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
@@ -91,8 +91,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("ShortWithoutTypeInfo", value);
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
index d523124..9f7f360 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
@@ -18,9 +18,9 @@
  */
 package org.apache.asterix.om.types;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.om.base.IAObject;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AOrderedListType extends AbstractCollectionType {
 
@@ -76,10 +76,11 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject type = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode type = om.createObjectNode();
         type.put("type", AOrderedListType.class.getName());
-        type.put("item-type", itemType.toJSON());
+        type.set("item-type", itemType.toJSON());
         return type;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
index fc1108f..4ce1a6d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
@@ -26,15 +26,15 @@
 import java.util.Map;
 import java.util.Set;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.annotations.IRecordTypeAnnotation;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.IAObject;
 import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.asterix.om.visitors.IOMVisitor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 /**
  * ARecordType is read-only and shared by different partitions at runtime.
@@ -327,8 +327,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject type = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode type = om.createObjectNode();
         type.put("type", ARecordType.class.getName());
         type.put("name", typeName);
         if (isOpen) {
@@ -337,14 +338,14 @@
             type.put("open", false);
         }
 
-        JSONArray fields = new JSONArray();
+        ArrayNode fields = om.createArrayNode();
         for (int i = 0; i < fieldNames.length; i++) {
-            JSONObject field = new JSONObject();
-            field.put(fieldNames[i], fieldTypes[i].toJSON());
-            fields.put(field);
+            ObjectNode field = om.createObjectNode();
+            field.set(fieldNames[i], fieldTypes[i].toJSON());
+            fields.add(field);
         }
 
-        type.put("fields", fields);
+        type.set("fields", fields);
         return type;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
index 9eb2b88..af06108 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
@@ -22,12 +22,12 @@
 import java.util.Iterator;
 import java.util.List;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.IAObject;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AUnionType extends AbstractComplexType {
 
@@ -203,21 +203,22 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject type = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode type = om.createObjectNode();
         type.put("type", AUnionType.class.getName());
 
-        JSONArray fields = new JSONArray();
+        ArrayNode fields = om.createArrayNode();
         Iterator<IAType> iter = unionList.iterator();
         if (iter.hasNext()) {
             IAType t0 = iter.next();
-            fields.put(t0.toJSON());
+            fields.add(t0.toJSON());
             while (iter.hasNext()) {
-                fields.put(iter.next().toJSON());
+                fields.add(iter.next().toJSON());
             }
         }
 
-        type.put("fields", fields);
+        type.set("fields", fields);
         return type;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java
index febc6ad..b4705ac 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java
@@ -18,10 +18,10 @@
  */
 package org.apache.asterix.om.types;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.om.base.AUnorderedList;
 import org.apache.asterix.om.base.IAObject;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AUnorderedListType extends AbstractCollectionType {
 
@@ -77,10 +77,11 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject type = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode type = om.createObjectNode();
         type.put("type", AUnorderedListType.class.getName());
-        type.put("item-type", itemType.toJSON());
+        type.set("item-type", itemType.toJSON());
         return type;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
index 809578b..42745f4 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
@@ -18,11 +18,11 @@
  */
 package org.apache.asterix.om.types;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.IAObject;
 import org.apache.asterix.om.visitors.IOMVisitor;
-import org.json.JSONException;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public abstract class BuiltinType implements IAType {
 
@@ -63,8 +63,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ASTERIX_TYPE");
             return type;
         }
@@ -90,8 +91,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AInt8");
             return type;
         }
@@ -117,8 +119,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AInt16");
             return type;
         }
@@ -144,8 +147,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AInt32");
             return type;
         }
@@ -171,8 +175,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AInt64");
             return type;
         }
@@ -198,8 +203,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ABinary");
             return type;
         }
@@ -225,8 +231,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AFloat");
             return type;
         }
@@ -252,8 +259,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ADouble");
             return type;
         }
@@ -279,8 +287,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AString");
             return type;
         }
@@ -306,8 +315,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AMISSING");
             return type;
         }
@@ -333,8 +343,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ANULL");
             return type;
         }
@@ -360,8 +371,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ABoolean");
             return type;
         }
@@ -387,8 +399,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ATime");
             return type;
         }
@@ -414,8 +427,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ADate");
             return type;
         }
@@ -441,8 +455,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ADateTime");
             return type;
         }
@@ -468,8 +483,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ADuration");
             return type;
         }
@@ -495,8 +511,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "AYearMonthDuration");
             return type;
         }
@@ -522,8 +539,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ADayTimeDuration");
             return type;
         }
@@ -549,7 +567,7 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
+        public ObjectNode toJSON() {
             return null;
         }
     };
@@ -574,8 +592,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "APoint");
             return type;
         }
@@ -601,8 +620,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "APoint3D");
             return type;
         }
@@ -628,8 +648,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ALINE");
             return type;
         }
@@ -655,8 +676,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "APOLYGON");
             return type;
         }
@@ -682,8 +704,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ACIRCLE");
             return type;
         }
@@ -709,8 +732,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ARECTANGLE");
             return type;
         }
@@ -736,8 +760,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ABitArray");
             return type;
         }
@@ -762,8 +787,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", getDisplayName());
             return type;
         }
@@ -794,8 +820,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "ANY");
             return type;
         }
@@ -826,8 +853,9 @@
         }
 
         @Override
-        public JSONObject toJSON() throws JSONException {
-            JSONObject type = new JSONObject();
+        public ObjectNode toJSON() {
+            ObjectMapper om = new ObjectMapper();
+            ObjectNode type = om.createObjectNode();
             type.put("type", "SHORTWITHOUTTYPEINFO");
             return type;
         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/JSONDeserializerForTypes.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/JSONDeserializerForTypes.java
index b646ea1..8e8993a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/JSONDeserializerForTypes.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/JSONDeserializerForTypes.java
@@ -23,9 +23,11 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.json.JSONArray;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
+import com.google.common.collect.Lists;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.AUnionType;
@@ -43,26 +45,26 @@
      * @return an valid AsterixDB type.
      * @throws Exception
      */
-    public static IAType convertFromJSON(JSONObject typeInJSON) throws Exception {
-        String typeName = typeInJSON.getString("type");
+    public static IAType convertFromJSON(JsonNode typeInJSON) throws Exception {
+        String typeName = typeInJSON.get("type").asText();
         // Deals with ordered list.
         if (typeName.equals(AOrderedListType.class.getName())) {
-            IAType itemType = convertFromJSON((JSONObject) typeInJSON.get("item-type"));
+            IAType itemType = convertFromJSON(typeInJSON.get("item-type"));
             return new AOrderedListType(itemType, "ordered-list");
         }
 
         // Deals with unordered list.
         if (typeName.equals(AUnorderedListType.class.getName())) {
-            IAType itemType = convertFromJSON((JSONObject) typeInJSON.get("item-type"));
+            IAType itemType = convertFromJSON(typeInJSON.get("item-type"));
             return new AUnorderedListType(itemType, "unordered-list");
         }
 
         // Deals with Union Type.
         if (typeName.equals(AUnionType.class.getName())) {
             List<IAType> unionTypes = new ArrayList<IAType>();
-            JSONArray fields = (JSONArray) typeInJSON.get("fields");
-            for (int i = 0; i < fields.length(); i++) {
-                JSONObject fieldType = (JSONObject) fields.get(i);
+            JsonNode fields = typeInJSON.get("fields");
+            for (int i = 0; i < fields.size(); i++) {
+                JsonNode fieldType = fields.get(i);
                 unionTypes.add(convertFromJSON(fieldType));
             }
             return new AUnionType(unionTypes, "union");
@@ -70,17 +72,17 @@
 
         // Deals with record types.
         if (typeName.equals(ARecordType.class.getName())) {
-            String name = typeInJSON.getString("name");
-            boolean openType = typeInJSON.getBoolean("open");
-            JSONArray fields = typeInJSON.getJSONArray("fields");
-            String[] fieldNames = new String[fields.length()];
-            IAType[] fieldTypes = new IAType[fields.length()];
-            for (int i = 0; i < fields.length(); ++i) {
-                JSONObject field = (JSONObject) fields.get(i);
-                JSONArray names = field.names();
-                String fieldName = names.getString(0);
+            String name = typeInJSON.get("name").asText();
+            boolean openType = typeInJSON.get("open").asBoolean();
+            JsonNode fields = typeInJSON.get("fields");
+            String[] fieldNames = new String[fields.size()];
+            IAType[] fieldTypes = new IAType[fields.size()];
+            for (int i = 0; i < fields.size(); ++i) {
+                JsonNode field = fields.get(i);
+                List<String> names = Lists.newArrayList(field.fieldNames());
+                String fieldName = names.get(0);
                 fieldNames[i] = fieldName;
-                fieldTypes[i] = convertFromJSON((JSONObject) field.get(fieldName));
+                fieldTypes[i] = convertFromJSON(field.get(fieldName));
             }
             return new ARecordType(name, fieldNames, fieldTypes, openType);
         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/util/ClusterStateManager.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/util/ClusterStateManager.java
index 3ba1965..c79524a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/util/ClusterStateManager.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/util/ClusterStateManager.java
@@ -31,6 +31,8 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 import org.apache.asterix.common.api.IClusterManagementWork.ClusterState;
 import org.apache.asterix.common.cluster.ClusterPartition;
 import org.apache.asterix.common.config.ReplicationProperties;
@@ -53,8 +55,8 @@
 import org.apache.hyracks.api.application.IClusterLifecycleListener.ClusterEventType;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.exceptions.HyracksException;
-import org.json.JSONException;
-import org.json.JSONObject;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 /**
  * A holder class for properties related to the Asterix cluster.
@@ -633,12 +635,15 @@
         return metadataNodeActive;
     }
 
-    public synchronized JSONObject getClusterStateDescription() throws JSONException {
-        JSONObject stateDescription = new JSONObject();
+    public synchronized ObjectNode getClusterStateDescription()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode stateDescription = om.createObjectNode();
         stateDescription.put("state", state.name());
         stateDescription.put("metadata_node", currentMetadataNode);
+        ArrayNode ncs = om.createArrayNode();
+        stateDescription.set("ncs",ncs);
         for (Map.Entry<String, ClusterPartition[]> entry : node2PartitionsMap.entrySet()) {
-            JSONObject nodeJSON = new JSONObject();
+            ObjectNode nodeJSON = om.createObjectNode();
             nodeJSON.put("node_id", entry.getKey());
             boolean allActive = true;
             boolean anyActive = false;
@@ -657,17 +662,18 @@
                     : allActive ? "ACTIVE"
                     : anyActive ? "PARTIALLY_ACTIVE"
                     : "INACTIVE");
-            nodeJSON.put("partitions", partitions);
-            stateDescription.accumulate("ncs", nodeJSON);
+            nodeJSON.putPOJO("partitions", partitions);
+            ncs.add(nodeJSON);
         }
         return stateDescription;
     }
 
-    public synchronized JSONObject getClusterStateSummary() throws JSONException {
-        JSONObject stateDescription = new JSONObject();
+    public synchronized ObjectNode getClusterStateSummary() {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode stateDescription = om.createObjectNode();
         stateDescription.put("state", state.name());
-        stateDescription.put("metadata_node", currentMetadataNode);
-        stateDescription.put("partitions", clusterPartitions);
+        stateDescription.putPOJO("metadata_node", currentMetadataNode);
+        stateDescription.putPOJO("partitions", clusterPartitions);
         return stateDescription;
     }
 }
diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml
index ee5067d..675d549 100644
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@ -68,7 +68,6 @@
     <junit.version>4.12</junit.version>
     <commons.io.version>2.5</commons.io.version>
     <servlet.api.version>3.1.0</servlet.api.version>
-    <json.version>20090211</json.version>
     <jacoco.version>0.7.6.201602180812</jacoco.version>
   </properties>
 
@@ -809,12 +808,6 @@
         <type>test-jar</type>
       </dependency>
       <dependency>
-        <groupId>org.json</groupId>
-        <artifactId>json</artifactId>
-        <version>${json.version}</version>
-        <type>jar</type>
-      </dependency>
-      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>javax.servlet-api</artifactId>
         <version>${servlet.api.version}</version>
@@ -845,6 +838,16 @@
         <artifactId>httpcore</artifactId>
         <version>4.4</version>
       </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-databind</artifactId>
+        <version>2.8.4</version>
+      </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-core</artifactId>
+        <version>2.8.4</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 </project>
