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>
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/pom.xml b/hyracks-fullstack/algebricks/algebricks-runtime/pom.xml
index 17dd1ea..3bd1316 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/pom.xml
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/pom.xml
@@ -68,14 +68,13 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-data-std</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java
index 0b7cb7e..1123c5e 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java
@@ -19,7 +19,10 @@
 package org.apache.hyracks.algebricks.runtime.operators.meta;
 
 import java.nio.ByteBuffer;
+import java.util.Arrays;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.algebricks.runtime.base.AlgebricksPipeline;
 import org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory;
 import org.apache.hyracks.api.comm.IFrameWriter;
@@ -32,8 +35,6 @@
 import org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor;
 import org.apache.hyracks.dataflow.std.base.AbstractUnaryInputUnaryOutputOperatorNodePushable;
 import org.apache.hyracks.dataflow.std.base.AbstractUnaryOutputSourceOperatorNodePushable;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 public class AlgebricksMetaOperatorDescriptor extends AbstractSingleActivityOperatorDescriptor {
 
@@ -56,9 +57,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = super.toJSON();
-        json.put("micro-operators", pipeline.getRuntimeFactories());
+    public ObjectNode toJSON() {
+        ObjectNode json = super.toJSON();
+        json.put("micro-operators", Arrays.toString(pipeline.getRuntimeFactories()));
         return json;
     }
 
@@ -70,10 +71,6 @@
             sb.append("  " + f.toString() + ";\n");
         }
         sb.append("}");
-        // sb.append(super.getInputArity());
-        // sb.append(";");
-        // sb.append(super.getOutputArity());
-        // sb.append(";");
         return sb.toString();
     }
 
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/pom.xml b/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
index f49189d..7c42c75 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
+++ b/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
@@ -154,16 +154,15 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-dataflow-std</artifactId>
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
     </dependency>
diff --git a/hyracks-fullstack/hyracks/hyracks-api/pom.xml b/hyracks-fullstack/hyracks/hyracks-api/pom.xml
index e624be6..c872bea 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-api/pom.xml
@@ -58,13 +58,6 @@
   </build>
   <dependencies>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>
       <version>4.5.2</version>
@@ -97,5 +90,10 @@
       <version>2.0.2-beta</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.8.1</version>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java
index 9a2a658..7dd5fe9 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java
@@ -28,7 +28,6 @@
 import java.util.logging.Logger;
 
 import org.apache.commons.lang3.tuple.Pair;
-import org.json.JSONException;
 
 import org.apache.hyracks.api.dataflow.ActivityId;
 import org.apache.hyracks.api.dataflow.IActivity;
@@ -150,12 +149,7 @@
         acg.addActivityClusters(acList);
 
         if (LOGGER.isLoggable(Level.FINE)) {
-            try {
-                LOGGER.fine(acg.toJSON().toString(2));
-            } catch (JSONException e) {
-                e.printStackTrace();
-                throw new RuntimeException(e);
-            }
+                LOGGER.fine(acg.toJSON().asText());
         }
         return acg;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IConnectorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IConnectorDescriptor.java
index 7219040..abff2f7 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IConnectorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IConnectorDescriptor.java
@@ -21,6 +21,7 @@
 import java.io.Serializable;
 import java.util.BitSet;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import org.apache.hyracks.api.application.ICCApplicationContext;
 import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.comm.IPartitionCollector;
@@ -30,8 +31,6 @@
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.job.ActivityCluster;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 /**
  * Connector that connects operators in a Job.
@@ -133,9 +132,8 @@
      * Translate this connector descriptor to JSON.
      *
      * @return
-     * @throws JSONException
      */
-    public JSONObject toJSON() throws JSONException;
+    public JsonNode toJSON();
 
     /**
      * Sets the connector Id
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IOperatorDescriptor.java
index 26561e6..b02c4f2 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/IOperatorDescriptor.java
@@ -20,11 +20,11 @@
 
 import java.io.Serializable;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.application.ICCApplicationContext;
 import org.apache.hyracks.api.constraints.IConstraintAcceptor;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 /**
  * Descriptor for operators in Hyracks.
@@ -99,5 +99,5 @@
     /**
      * Translates this operator descriptor to JSON.
      */
-    public JSONObject toJSON() throws JSONException;
+    public ObjectNode toJSON();
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/JSONSerializable.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/JSONSerializable.java
index 391b637..23ae97b 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/JSONSerializable.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/JSONSerializable.java
@@ -18,14 +18,14 @@
  */
 package org.apache.hyracks.api.dataflow.value;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public interface JSONSerializable {
     /**
      * Returns the JSON representation of the object.
      *
-     * @return A new JSONObject instance representing this Java object.
+     * @return A om.createObjectNode instance representing this Java object.
      */
-    public JSONObject toJSON() throws JSONException;
+    public ObjectNode toJSON() ;
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java
index cefdd7d..e5fad32 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java
@@ -25,10 +25,11 @@
 import java.util.Map;
 import java.util.Set;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.commons.lang3.tuple.Pair;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 import org.apache.hyracks.api.dataflow.ActivityId;
 import org.apache.hyracks.api.dataflow.ConnectorDescriptorId;
@@ -186,50 +187,50 @@
         vList.set(index, value);
     }
 
-    public JSONObject toJSON() throws JSONException {
-        JSONObject jac = new JSONObject();
-
-        JSONArray jans = new JSONArray();
+    public JsonNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ArrayNode jans = om.createArrayNode();
+        ObjectNode jac = om.createObjectNode();
         for (IActivity an : activities.values()) {
-            JSONObject jan = new JSONObject();
+            ObjectNode jan = om.createObjectNode();
             jan.put("id", an.getActivityId().toString());
             jan.put("java-class", an.getClass().getName());
 
             List<IConnectorDescriptor> inputs = activityInputMap.get(an.getActivityId());
             if (inputs != null) {
-                JSONArray jInputs = new JSONArray();
+                ArrayNode jInputs = om.createArrayNode();
                 for (int i = 0; i < inputs.size(); ++i) {
-                    JSONObject jInput = new JSONObject();
+                    ObjectNode jInput = om.createObjectNode();
                     jInput.put("input-port", i);
                     jInput.put("connector-id", inputs.get(i).getConnectorId().toString());
-                    jInputs.put(jInput);
+                    jInputs.add(jInput);
                 }
-                jan.put("inputs", jInputs);
+                jan.set("inputs", jInputs);
             }
 
             List<IConnectorDescriptor> outputs = activityOutputMap.get(an.getActivityId());
             if (outputs != null) {
-                JSONArray jOutputs = new JSONArray();
+                ArrayNode jOutputs = om.createArrayNode();
                 for (int i = 0; i < outputs.size(); ++i) {
-                    JSONObject jOutput = new JSONObject();
+                    ObjectNode jOutput = om.createObjectNode();
                     jOutput.put("output-port", i);
                     jOutput.put("connector-id", outputs.get(i).getConnectorId().toString());
-                    jOutputs.put(jOutput);
+                    jOutputs.add(jOutput);
                 }
-                jan.put("outputs", jOutputs);
+                jan.set("outputs", jOutputs);
             }
 
             Set<ActivityId> blockers = getBlocked2BlockerMap().get(an.getActivityId());
             if (blockers != null) {
-                JSONArray jDeps = new JSONArray();
+                ArrayNode jDeps = om.createArrayNode();
                 for (ActivityId blocker : blockers) {
-                    jDeps.put(blocker.toString());
+                    jDeps.add(blocker.toString());
                 }
-                jan.put("depends-on", jDeps);
+                jan.set("depends-on", jDeps);
             }
-            jans.put(jan);
+            jans.add(jan);
         }
-        jac.put("activities", jans);
+        jac.set("activities", jans);
 
         return jac;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java
index 7df619d..b64e2d5 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java
@@ -24,10 +24,9 @@
 import java.util.List;
 import java.util.Map;
 
-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.hyracks.api.dataflow.ActivityId;
 import org.apache.hyracks.api.dataflow.ConnectorDescriptorId;
 import org.apache.hyracks.api.dataflow.IConnectorDescriptor;
@@ -162,15 +161,15 @@
         return ac.getProducerActivity(cid);
     }
 
-    public JSONObject toJSON() throws JSONException {
-        JSONObject acgj = new JSONObject();
-
-        JSONArray acl = new JSONArray();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode acgj = om.createObjectNode();
+        ArrayNode acl = om.createArrayNode();
         for (ActivityCluster ac : activityClusterMap.values()) {
-            acl.put(ac.toJSON());
+            acl.add(ac.toJSON());
         }
         acgj.put("version", version);
-        acgj.put("activity-clusters", acl);
+        acgj.set("activity-clusters", acl);
         return acgj;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
index 7b44ff5..84a961e 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hyracks.api.job;
 
+import java.io.IOException;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -27,6 +28,10 @@
 import java.util.Map;
 import java.util.Set;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.hyracks.api.constraints.Constraint;
 import org.apache.hyracks.api.constraints.expressions.ConstantExpression;
@@ -39,9 +44,6 @@
 import org.apache.hyracks.api.dataflow.connectors.IConnectorPolicyAssignmentPolicy;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.dataset.ResultSetId;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 public class JobSpecification implements Serializable, IOperatorDescriptorRegistry, IConnectorDescriptorRegistry {
     private static final long serialVersionUID = 1L;
@@ -343,16 +345,17 @@
     }
 
     @SuppressWarnings("incomplete-switch")
-    public JSONObject toJSON() throws JSONException {
-        JSONObject jjob = new JSONObject();
+    public ObjectNode toJSON() throws IOException {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode jjob = om.createObjectNode();
 
-        JSONArray jopArray = new JSONArray();
+        ArrayNode jopArray = om.createArrayNode();
         for (Map.Entry<OperatorDescriptorId, IOperatorDescriptor> e : opMap.entrySet()) {
-            JSONObject op = e.getValue().toJSON();
+            ObjectNode op = e.getValue().toJSON();
             if (!userConstraints.isEmpty()) {
                 // Add operator partition constraints to each JSON operator.
-                JSONObject pcObject = new JSONObject();
-                JSONObject pleObject = new JSONObject();
+                ObjectNode pcObject = om.createObjectNode();
+                ObjectNode pleObject = om.createObjectNode();
                 Iterator<Constraint> test = userConstraints.iterator();
                 while (test.hasNext()) {
                     Constraint constraint = test.next();
@@ -372,20 +375,20 @@
                             break;
                     }
                 }
-                if (pleObject.length() > 0) {
-                    pcObject.put("location", pleObject);
+                if (pleObject.size() > 0) {
+                    pcObject.set("location", pleObject);
                 }
-                if (pcObject.length() > 0) {
-                    op.put("partition-constraints", pcObject);
+                if (pcObject.size() > 0) {
+                    op.set("partition-constraints", pcObject);
                 }
             }
-            jopArray.put(op);
+            jopArray.add(op);
         }
-        jjob.put("operators", jopArray);
+        jjob.set("operators", jopArray);
 
-        JSONArray jcArray = new JSONArray();
+        ArrayNode jcArray = om.createArrayNode();
         for (Map.Entry<ConnectorDescriptorId, IConnectorDescriptor> e : connMap.entrySet()) {
-            JSONObject conn = new JSONObject();
+            ObjectNode conn = om.createObjectNode();
             Pair<Pair<IOperatorDescriptor, Integer>, Pair<IOperatorDescriptor, Integer>> connection = connectorOpMap
                     .get(e.getKey());
             if (connection != null) {
@@ -394,10 +397,10 @@
                 conn.put("out-operator-id", connection.getRight().getLeft().getOperatorId().toString());
                 conn.put("out-operator-port", connection.getRight().getRight().intValue());
             }
-            conn.put("connector", e.getValue().toJSON());
-            jcArray.put(conn);
+            conn.set("connector", e.getValue().toJSON());
+            jcArray.add(conn);
         }
-        jjob.put("connectors", jcArray);
+        jjob.set("connectors", jcArray);
 
         return jjob;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-client/pom.xml b/hyracks-fullstack/hyracks/hyracks-client/pom.xml
index bf5d167..a532366 100644
--- a/hyracks-fullstack/hyracks/hyracks-client/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-client/pom.xml
@@ -102,14 +102,13 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>com.googlecode.json-simple</groupId>
-      <artifactId>json-simple</artifactId>
-      <version>1.1</version>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-client/src/main/java/org/apache/hyracks/client/stats/impl/ClientCounterContext.java b/hyracks-fullstack/hyracks/hyracks-client/src/main/java/org/apache/hyracks/client/stats/impl/ClientCounterContext.java
index 74b61b2..5d0865c 100644
--- a/hyracks-fullstack/hyracks/hyracks-client/src/main/java/org/apache/hyracks/client/stats/impl/ClientCounterContext.java
+++ b/hyracks-fullstack/hyracks/hyracks-client/src/main/java/org/apache/hyracks/client/stats/impl/ClientCounterContext.java
@@ -23,16 +23,12 @@
 import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
-import org.json.simple.JSONArray;
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
-
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.job.profiling.counters.ICounter;
 import org.apache.hyracks.client.stats.AggregateCounter;
 import org.apache.hyracks.client.stats.Counters;
@@ -44,7 +40,8 @@
  */
 public class ClientCounterContext implements IClusterCounterContext {
     private static String[] RESET_COUNTERS = { Counters.NETWORK_IO_READ, Counters.NETWORK_IO_WRITE,
-            Counters.MEMORY_USAGE, Counters.MEMORY_MAX, Counters.DISK_READ, Counters.DISK_WRITE, Counters.NUM_PROCESSOR };
+            Counters.MEMORY_USAGE, Counters.MEMORY_MAX, Counters.DISK_READ, Counters.DISK_WRITE,
+            Counters.NUM_PROCESSOR };
     private static String[] AGG_COUNTERS = { Counters.SYSTEM_LOAD };
     private static int UPDATE_INTERVAL = 10000;
 
@@ -118,8 +115,8 @@
     public ICounter getCounter(String machineName, String counterName, boolean create) {
         Counter counter = counterMap.get(machineName + "$" + counterName);
         if (counter == null) {
-            throw new IllegalStateException("request an unknown counter: " + counterName + " on slave machine "
-                    + machineName + "!");
+            throw new IllegalStateException(
+                    "request an unknown counter: " + counterName + " on slave machine " + machineName + "!");
         }
         return counter;
     }
@@ -132,11 +129,11 @@
             reset();
             for (String slave : slaveMachines) {
                 String slaveProfile = requestProfile(slave);
-                JSONParser parser = new JSONParser();
-                JSONObject jo = (JSONObject) parser.parse(slaveProfile);
-                Object counterObject = jo.get("result");
-                if (counterObject instanceof JSONObject) {
-                    updateCounterMapWithJSONArray(slave, (JSONObject) counterObject);
+                ObjectMapper parser = new ObjectMapper();
+                JsonNode jo = parser.readTree(slaveProfile);
+                JsonNode counterObject = jo.get("result");
+                if (counterObject.isObject()) {
+                    updateCounterMapWithArrayNode(slave, counterObject);
                 }
             }
         } catch (Exception e) {
@@ -150,7 +147,7 @@
      * @param jo
      *            the Profile JSON object
      */
-    private void updateCounterMapWithJSONArray(String slave, JSONObject jo) {
+    private void updateCounterMapWithArrayNode(String slave, JsonNode jo) {
         for (String counterName : RESET_COUNTERS) {
             updateCounter(slave, jo, counterName);
         }
@@ -160,8 +157,8 @@
         }
     }
 
-    private void updateCounter(String slave, JSONObject jo, String counterName) {
-        Object counterObject = jo.get(counterName);
+    private void updateCounter(String slave, JsonNode jo, String counterName) {
+        JsonNode counterObject = jo.get(counterName);
         long counterValue = extractCounterValue(counterObject);
         // global counter
         ICounter counter = getCounter(counterName, true);
@@ -171,34 +168,30 @@
         localCounter.set(counterValue);
     }
 
-    private long extractCounterValue(Object counterObject) {
+    private long extractCounterValue(JsonNode counterObject) {
         long counterValue = 0;
         if (counterObject == null) {
             return counterValue;
-        } else if (counterObject instanceof JSONArray) {
-            JSONArray jArray = (JSONArray) counterObject;
-            Object[] values = jArray.toArray();
+        } else if (counterObject.isObject()) {
             /**
              * use the last non-zero value as the counter value
              */
-            for (Object value : values) {
-                if (value instanceof Double) {
-                    Double dValue = (Double) value;
-                    double currentVal = dValue.doubleValue();
+            for (Iterator<JsonNode> jsonIt = counterObject.iterator(); jsonIt.hasNext();) {
+                JsonNode value = jsonIt.next();
+                if (value.isDouble()) {
+                    double currentVal = value.asDouble();
                     if (currentVal != 0) {
                         counterValue = (long) currentVal;
                     }
-                } else if (value instanceof Long) {
-                    Long lValue = (Long) value;
-                    long currentVal = lValue.longValue();
+                } else if (value.isLong()) {
+                    long currentVal = value.asLong();
                     if (currentVal != 0) {
-                        counterValue = lValue.longValue();
+                        counterValue = currentVal;
                     }
                 }
             }
         } else {
-            Long val = (Long) counterObject;
-            counterValue = val.longValue();
+            counterValue = counterObject.asLong();
         }
         return counterValue;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
index 350a7b3..636e1fe 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
@@ -102,14 +102,18 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
       <version>3.5</version>
     </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>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
index ca980b9..bf94dff 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
@@ -25,6 +25,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.comm.NetworkAddress;
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.control.common.base.INodeController;
@@ -33,8 +35,6 @@
 import org.apache.hyracks.control.common.heartbeat.HeartbeatData;
 import org.apache.hyracks.control.common.heartbeat.HeartbeatSchema;
 import org.apache.hyracks.control.common.heartbeat.HeartbeatSchema.GarbageCollectorInfo;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 public class NodeControllerState {
     private static final int RRD_SIZE = 720;
@@ -277,13 +277,13 @@
     public NetworkAddress getMessagingPort() {
         return messagingPort;
     }
-
     public int getNumCores() {
         return numCores;
     }
 
-    public synchronized JSONObject toSummaryJSON() throws JSONException {
-        JSONObject o = new JSONObject();
+    public synchronized ObjectNode toSummaryJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode o = om.createObjectNode();
         o.put("node-id", ncConfig.nodeId);
         o.put("heap-used", heapUsedSize[(rrdPtr + RRD_SIZE - 1) % RRD_SIZE]);
         o.put("system-load-average", systemLoadAverage[(rrdPtr + RRD_SIZE - 1) % RRD_SIZE]);
@@ -291,8 +291,9 @@
         return o;
     }
 
-    public synchronized JSONObject toDetailedJSON(boolean includeStats, boolean includeConfig) throws JSONException {
-        JSONObject o = new JSONObject();
+    public synchronized ObjectNode toDetailedJSON(boolean includeStats, boolean includeConfig)  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode o = om.createObjectNode();
 
         o.put("node-id", ncConfig.nodeId);
 
@@ -304,45 +305,45 @@
             o.put("vm-name", vmName);
             o.put("vm-version", vmVersion);
             o.put("vm-vendor", vmVendor);
-            o.put("classpath", classpath.split(File.pathSeparator));
-            o.put("library-path", libraryPath.split(File.pathSeparator));
-            o.put("boot-classpath", bootClasspath.split(File.pathSeparator));
-            o.put("input-arguments", inputArguments);
-            o.put("system-properties", systemProperties);
+            o.putPOJO("classpath", classpath.split(File.pathSeparator));
+            o.putPOJO("library-path", libraryPath.split(File.pathSeparator));
+            o.putPOJO("boot-classpath", bootClasspath.split(File.pathSeparator));
+            o.putPOJO("input-arguments", inputArguments);
+            o.putPOJO("system-properties", systemProperties);
             o.put("pid", pid);
         }
         if (includeStats) {
-            o.put("date", new Date());
+            o.putPOJO("date", new Date());
             o.put("rrd-ptr", rrdPtr);
-            o.put("heartbeat-times", hbTime);
-            o.put("heap-init-sizes", heapInitSize);
-            o.put("heap-used-sizes", heapUsedSize);
-            o.put("heap-committed-sizes", heapCommittedSize);
-            o.put("heap-max-sizes", heapMaxSize);
-            o.put("nonheap-init-sizes", nonheapInitSize);
-            o.put("nonheap-used-sizes", nonheapUsedSize);
-            o.put("nonheap-committed-sizes", nonheapCommittedSize);
-            o.put("nonheap-max-sizes", nonheapMaxSize);
-            o.put("thread-counts", threadCount);
-            o.put("peak-thread-counts", peakThreadCount);
-            o.put("system-load-averages", systemLoadAverage);
-            o.put("gc-names", gcNames);
-            o.put("gc-collection-counts", gcCollectionCounts);
-            o.put("gc-collection-times", gcCollectionTimes);
-            o.put("net-payload-bytes-read", netPayloadBytesRead);
-            o.put("net-payload-bytes-written", netPayloadBytesWritten);
-            o.put("net-signaling-bytes-read", netSignalingBytesRead);
-            o.put("net-signaling-bytes-written", netSignalingBytesWritten);
-            o.put("dataset-net-payload-bytes-read", datasetNetPayloadBytesRead);
-            o.put("dataset-net-payload-bytes-written", datasetNetPayloadBytesWritten);
-            o.put("dataset-net-signaling-bytes-read", datasetNetSignalingBytesRead);
-            o.put("dataset-net-signaling-bytes-written", datasetNetSignalingBytesWritten);
-            o.put("ipc-messages-sent", ipcMessagesSent);
-            o.put("ipc-message-bytes-sent", ipcMessageBytesSent);
-            o.put("ipc-messages-received", ipcMessagesReceived);
-            o.put("ipc-message-bytes-received", ipcMessageBytesReceived);
-            o.put("disk-reads", diskReads);
-            o.put("disk-writes", diskWrites);
+            o.putPOJO("heartbeat-times", hbTime);
+            o.putPOJO("heap-init-sizes", heapInitSize);
+            o.putPOJO("heap-used-sizes", heapUsedSize);
+            o.putPOJO("heap-committed-sizes", heapCommittedSize);
+            o.putPOJO("heap-max-sizes", heapMaxSize);
+            o.putPOJO("nonheap-init-sizes", nonheapInitSize);
+            o.putPOJO("nonheap-used-sizes", nonheapUsedSize);
+            o.putPOJO("nonheap-committed-sizes", nonheapCommittedSize);
+            o.putPOJO("nonheap-max-sizes", nonheapMaxSize);
+            o.putPOJO("thread-counts", threadCount);
+            o.putPOJO("peak-thread-counts", peakThreadCount);
+            o.putPOJO("system-load-averages", systemLoadAverage);
+            o.putPOJO("gc-names", gcNames);
+            o.putPOJO("gc-collection-counts", gcCollectionCounts);
+            o.putPOJO("gc-collection-times", gcCollectionTimes);
+            o.putPOJO("net-payload-bytes-read", netPayloadBytesRead);
+            o.putPOJO("net-payload-bytes-written", netPayloadBytesWritten);
+            o.putPOJO("net-signaling-bytes-read", netSignalingBytesRead);
+            o.putPOJO("net-signaling-bytes-written", netSignalingBytesWritten);
+            o.putPOJO("dataset-net-payload-bytes-read", datasetNetPayloadBytesRead);
+            o.putPOJO("dataset-net-payload-bytes-written", datasetNetPayloadBytesWritten);
+            o.putPOJO("dataset-net-signaling-bytes-read", datasetNetSignalingBytesRead);
+            o.putPOJO("dataset-net-signaling-bytes-written", datasetNetSignalingBytesWritten);
+            o.putPOJO("ipc-messages-sent", ipcMessagesSent);
+            o.putPOJO("ipc-message-bytes-sent", ipcMessageBytesSent);
+            o.putPOJO("ipc-messages-received", ipcMessagesReceived);
+            o.putPOJO("ipc-message-bytes-received", ipcMessageBytesReceived);
+            o.putPOJO("disk-reads", diskReads);
+            o.putPOJO("disk-writes", diskWrites);
         }
 
         return o;
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java
index 32ac3f5..680c2a7 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java
@@ -18,22 +18,23 @@
  */
 package org.apache.hyracks.control.cc.adminconsole.pages;
 
+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.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 import org.apache.hyracks.control.cc.ClusterControllerService;
-import org.apache.hyracks.control.cc.web.util.JSONUtils;
 import org.apache.hyracks.control.cc.work.GetJobSummariesJSONWork;
 import org.apache.hyracks.control.cc.work.GetNodeSummariesJSONWork;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.List;
 
 public class IndexPage extends AbstractPage {
     private static final long serialVersionUID = 1L;
@@ -43,49 +44,42 @@
 
         GetNodeSummariesJSONWork gnse = new GetNodeSummariesJSONWork(ccs);
         ccs.getWorkQueue().scheduleAndSync(gnse);
-        JSONArray nodeSummaries = gnse.getSummaries();
-        add(new Label("node-count", String.valueOf(nodeSummaries.length())));
-        ListView<JSONObject> nodeList = new ListView<JSONObject>("node-list", JSONUtils.toList(nodeSummaries)) {
+        ArrayNode nodeSummaries = gnse.getSummaries();
+        add(new Label("node-count", String.valueOf(nodeSummaries.size())));
+        ListView<JsonNode> nodeList = new ListView<JsonNode>("node-list",
+                Lists.newArrayList(nodeSummaries.iterator())) {
             private static final long serialVersionUID = 1L;
 
             @Override
-            protected void populateItem(ListItem<JSONObject> item) {
-                JSONObject o = item.getModelObject();
-                try {
-                    item.add(new Label("node-id", o.getString("node-id")));
-                    item.add(new Label("heap-used", o.getString("heap-used")));
-                    item.add(new Label("system-load-average", o.getString("system-load-average")));
-                    PageParameters params = new PageParameters();
-                    params.add("node-id", o.getString("node-id"));
-                    item.add(new BookmarkablePageLink<Object>("node-details", NodeDetailsPage.class, params));
-                } catch (JSONException e) {
-                    throw new RuntimeException(e);
-                }
+            protected void populateItem(ListItem<JsonNode> item) {
+                JsonNode o = item.getModelObject();
+                item.add(new Label("node-id", o.get("node-id").asText()));
+                item.add(new Label("heap-used", o.get("heap-used").asText()));
+                item.add(new Label("system-load-average", o.get("system-load-average").asText()));
+                PageParameters params = new PageParameters();
+                params.add("node-id", o.get("node-id").asText());
+                item.add(new BookmarkablePageLink<Object>("node-details", NodeDetailsPage.class, params));
             }
         };
         add(nodeList);
 
         GetJobSummariesJSONWork gjse = new GetJobSummariesJSONWork(ccs);
         ccs.getWorkQueue().scheduleAndSync(gjse);
-        JSONArray jobSummaries = gjse.getSummaries();
-        ListView<JSONObject> jobList = new ListView<JSONObject>("jobs-list", JSONUtils.toList(jobSummaries)) {
+        ArrayNode jobSummaries = gjse.getSummaries();
+        ListView<JsonNode> jobList = new ListView<JsonNode>("jobs-list", Lists.newArrayList(jobSummaries.iterator())) {
             private static final long serialVersionUID = 1L;
 
             @Override
-            protected void populateItem(ListItem<JSONObject> item) {
-                JSONObject o = item.getModelObject();
-                try {
-                    item.add(new Label("job-id", o.getString("job-id")));
-                    item.add(new Label("status", o.getString("status")));
-                    item.add(new Label("create-time", longToDateString(Long.parseLong(o.getString("create-time")))));
-                    item.add(new Label("start-time", longToDateString(Long.parseLong(o.getString("start-time")))));
-                    item.add(new Label("end-time", longToDateString(Long.parseLong(o.getString("end-time")))));
-                    PageParameters params = new PageParameters();
-                    params.add("job-id", o.getString("job-id"));
-                    item.add(new BookmarkablePageLink<Object>("job-details", JobDetailsPage.class, params));
-                } catch (JSONException e) {
-                    throw new RuntimeException(e);
-                }
+            protected void populateItem(ListItem<JsonNode> item) {
+                JsonNode o = item.getModelObject();
+                item.add(new Label("job-id", o.get("job-id").asText()));
+                item.add(new Label("status", o.get("status").asText()));
+                item.add(new Label("create-time", longToDateString(Long.parseLong(o.get("create-time").asText()))));
+                item.add(new Label("start-time", longToDateString(Long.parseLong(o.get("start-time").asText()))));
+                item.add(new Label("end-time", longToDateString(Long.parseLong(o.get("end-time").asText()))));
+                PageParameters params = new PageParameters();
+                params.add("job-id", o.get("job-id"));
+                item.add(new BookmarkablePageLink<Object>("job-details", JobDetailsPage.class, params));
             }
         };
         add(jobList);
@@ -99,4 +93,4 @@
         Date date = new Date(milliseconds);
         return sdf.format(date);
     }
-}
\ No newline at end of file
+}
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java
index 7898122..abc07d9 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java
@@ -26,11 +26,12 @@
 import java.util.List;
 import java.util.Map;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.util.string.StringValue;
-import org.json.JSONArray;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.hyracks.api.dataflow.ActivityId;
 import org.apache.hyracks.api.dataflow.TaskAttemptId;
@@ -58,19 +59,19 @@
         jag.setEscapeModelStrings(false);
         add(jag);
 
-        JSONObject jagO = gacgw.getJSON();
+        ObjectNode jagO = gacgw.getJSON();
 
         Map<ActivityId, String> activityMap = new HashMap<ActivityId, String>();
         if (jagO.has("activity-clusters")) {
-            JSONArray acArray = jagO.getJSONArray("activity-clusters");
-            for (int j = 0; j < acArray.length(); ++j) {
-                JSONObject acO = acArray.getJSONObject(j);
+            JsonNode acArray = jagO.get("activity-clusters");
+            for (int j = 0; j < acArray.size(); ++j) {
+                JsonNode acO = acArray.get(j);
                 if (acO.has("activities")) {
-                    JSONArray aArray = acO.getJSONArray("activities");
-                    for (int i = 0; i < aArray.length(); ++i) {
-                        JSONObject aO = aArray.getJSONObject(i);
-                        ActivityId aid = ActivityId.parse(aO.getString("id"));
-                        String className = aO.getString("java-class");
+                    JsonNode aArray = acO.get("activities");
+                    for (int i = 0; i < aArray.size(); ++i) {
+                        JsonNode aO = aArray.get(i);
+                        ActivityId aid = ActivityId.parse(aO.get("id").asText());
+                        String className = aO.get("java-class").asText();
 
                         activityMap.put(aid, className);
                     }
@@ -84,30 +85,30 @@
         jobrun.setEscapeModelStrings(false);
         add(jobrun);
 
-        JSONObject jrO = gjrw.getJSON();
+        ObjectNode jrO = gjrw.getJSON();
 
         List<TaskClusterAttempt[]> tcList = new ArrayList<TaskClusterAttempt[]>();
         long minTime = Long.MAX_VALUE;
         long maxTime = Long.MIN_VALUE;
         if (jrO.has("activity-clusters")) {
-            JSONArray acA = jrO.getJSONArray("activity-clusters");
-            for (int i = 0; i < acA.length(); ++i) {
-                JSONObject acO = acA.getJSONObject(i);
+            JsonNode acA = jrO.get("activity-clusters");
+            for (int i = 0; i < acA.size(); ++i) {
+                JsonNode acO = acA.get(i);
                 if (acO.has("plan")) {
-                    JSONObject planO = acO.getJSONObject("plan");
+                    JsonNode planO = acO.get("plan");
                     if (planO.has("task-clusters")) {
-                        JSONArray tcA = planO.getJSONArray("task-clusters");
-                        for (int j = 0; j < tcA.length(); ++j) {
-                            JSONObject tcO = tcA.getJSONObject(j);
-                            String tcId = tcO.getString("task-cluster-id");
+                        JsonNode tcA = planO.get("task-clusters");
+                        for (int j = 0; j < tcA.size(); ++j) {
+                            JsonNode tcO = tcA.get(j);
+                            String tcId = tcO.get("task-cluster-id").asText();
                             if (tcO.has("attempts")) {
-                                JSONArray tcaA = tcO.getJSONArray("attempts");
-                                TaskClusterAttempt[] tcAttempts = new TaskClusterAttempt[tcaA.length()];
-                                for (int k = 0; k < tcaA.length(); ++k) {
-                                    JSONObject tcaO = tcaA.getJSONObject(k);
-                                    int attempt = tcaO.getInt("attempt");
-                                    long startTime = tcaO.getLong("start-time");
-                                    long endTime = tcaO.getLong("end-time");
+                                JsonNode tcaA = tcO.get("attempts");
+                                TaskClusterAttempt[] tcAttempts = new TaskClusterAttempt[tcaA.size()];
+                                for (int k = 0; k < tcaA.size(); ++k) {
+                                    JsonNode tcaO = tcaA.get(k);
+                                    int attempt = tcaO.get("attempt").asInt();
+                                    long startTime = tcaO.get("start-time").asLong();
+                                    long endTime = tcaO.get("end-time").asLong();
 
                                     tcAttempts[k] = new TaskClusterAttempt(tcId, attempt, startTime, endTime);
                                     if (startTime < minTime) {
@@ -117,13 +118,13 @@
                                         maxTime = endTime;
                                     }
                                     if (tcaO.has("task-attempts")) {
-                                        JSONArray taArray = tcaO.getJSONArray("task-attempts");
-                                        tcAttempts[k].tasks = new TaskAttempt[taArray.length()];
-                                        for (int l = 0; l < taArray.length(); ++l) {
-                                            JSONObject taO = taArray.getJSONObject(l);
-                                            TaskAttemptId taId = TaskAttemptId.parse(taO.getString("task-attempt-id"));
-                                            TaskAttempt ta = new TaskAttempt(taId, taO.getLong("start-time"),
-                                                    taO.getLong("end-time"));
+                                        JsonNode taArray = tcaO.get("task-attempts");
+                                        tcAttempts[k].tasks = new TaskAttempt[taArray.size()];
+                                        for (int l = 0; l < taArray.size(); ++l) {
+                                            JsonNode taO = taArray.get(l);
+                                            TaskAttemptId taId = TaskAttemptId.parse(taO.get("task-attempt-id").asText());
+                                            TaskAttempt ta = new TaskAttempt(taId, taO.get("start-time").asLong(),
+                                                    taO.get("end-time").asLong());
                                             tcAttempts[k].tasks[l] = ta;
                                             TaskId tid = taId.getTaskId();
                                             ta.name = activityMap.get(tid.getActivityId());
@@ -154,31 +155,31 @@
 
         Map<TaskAttemptId, TaskProfile> tpMap = new HashMap<TaskAttemptId, TaskProfile>();
         if (jrO.has("profile")) {
-            JSONObject pO = jrO.getJSONObject("profile");
+            JsonNode pO = jrO.get("profile");
             if (pO.has("joblets")) {
-                JSONArray jobletsA = pO.getJSONArray("joblets");
-                for (int i = 0; i < jobletsA.length(); ++i) {
-                    JSONObject jobletO = jobletsA.getJSONObject(i);
+                JsonNode jobletsA = pO.get("joblets");
+                for (int i = 0; i < jobletsA.size(); ++i) {
+                    JsonNode jobletO = jobletsA.get(i);
                     if (jobletO.has("tasks")) {
-                        JSONArray tasksA = jobletO.getJSONArray("tasks");
-                        for (int j = 0; j < tasksA.length(); ++j) {
-                            JSONObject taskO = tasksA.getJSONObject(j);
-                            ActivityId activityId = ActivityId.parse(taskO.getString("activity-id"));
-                            int partition = taskO.getInt("partition");
-                            int attempt = taskO.getInt("attempt");
+                        JsonNode tasksA = jobletO.get("tasks");
+                        for (int j = 0; j < tasksA.size(); ++j) {
+                            JsonNode taskO = tasksA.get(j);
+                            ActivityId activityId = ActivityId.parse(taskO.get("activity-id").asText());
+                            int partition = taskO.get("partition").asInt();
+                            int attempt = taskO.get("attempt").asInt();
                             TaskAttemptId taId = new TaskAttemptId(new TaskId(activityId, partition), attempt);
                             if (taskO.has("partition-send-profile")) {
-                                JSONArray taskProfilesA = taskO.getJSONArray("partition-send-profile");
-                                for (int k = 0; k < taskProfilesA.length(); ++k) {
-                                    JSONObject ppO = taskProfilesA.getJSONObject(k);
-                                    long openTime = ppO.getLong("open-time");
-                                    long closeTime = ppO.getLong("close-time");
-                                    int resolution = ppO.getInt("resolution");
-                                    long offset = ppO.getLong("offset");
-                                    JSONArray frameTimesA = ppO.getJSONArray("frame-times");
-                                    long[] frameTimes = new long[frameTimesA.length()];
+                                JsonNode taskProfilesA = taskO.get("partition-send-profile");
+                                for (int k = 0; k < taskProfilesA.size(); ++k) {
+                                    JsonNode ppO = taskProfilesA.get(k);
+                                    long openTime = ppO.get("open-time").asLong();
+                                    long closeTime = ppO.get("close-time").asLong();
+                                    int resolution = ppO.get("resolution").asInt();
+                                    long offset = ppO.get("offset").asLong();
+                                    JsonNode frameTimesA = ppO.get("frame-times");
+                                    long[] frameTimes = new long[frameTimesA.size()];
                                     for (int l = 0; l < frameTimes.length; ++l) {
-                                        frameTimes[l] = frameTimesA.getInt(l) + offset;
+                                        frameTimes[l] = frameTimesA.get(l).asLong() + offset;
                                     }
                                     TaskProfile tp = new TaskProfile(taId, openTime, closeTime, frameTimes, resolution);
                                     if (!tpMap.containsKey(tp.taId)) {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobRun.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobRun.java
index dbe4202..f1d04bb 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobRun.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobRun.java
@@ -28,10 +28,9 @@
 import java.util.Map;
 import java.util.Set;
 
-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.hyracks.api.dataflow.ActivityId;
 import org.apache.hyracks.api.dataflow.ConnectorDescriptorId;
 import org.apache.hyracks.api.dataflow.OperatorDescriptorId;
@@ -237,131 +236,132 @@
         return connectorPolicyMap;
     }
 
-    public JSONObject toJSON() throws JSONException {
-        JSONObject result = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode result = om.createObjectNode();
 
         result.put("job-id", jobId.toString());
-        result.put("status", getStatus());
+        result.putPOJO("status", getStatus());
         result.put("create-time", getCreateTime());
         result.put("start-time", getStartTime());
         result.put("end-time", getEndTime());
 
-        JSONArray aClusters = new JSONArray();
+        ArrayNode aClusters = om.createArrayNode();
         for (ActivityCluster ac : acg.getActivityClusterMap().values()) {
-            JSONObject acJSON = new JSONObject();
+            ObjectNode acJSON = om.createObjectNode();
 
             acJSON.put("activity-cluster-id", String.valueOf(ac.getId()));
 
-            JSONArray activitiesJSON = new JSONArray();
+            ArrayNode activitiesJSON = om.createArrayNode();
             for (ActivityId aid : ac.getActivityMap().keySet()) {
-                activitiesJSON.put(aid);
+                activitiesJSON.addPOJO(aid);
             }
-            acJSON.put("activities", activitiesJSON);
+            acJSON.set("activities", activitiesJSON);
 
-            JSONArray dependenciesJSON = new JSONArray();
+            ArrayNode dependenciesJSON = om.createArrayNode();
             for (ActivityCluster dependency : ac.getDependencies()) {
-                dependenciesJSON.put(String.valueOf(dependency.getId()));
+                dependenciesJSON.add(String.valueOf(dependency.getId()));
             }
-            acJSON.put("dependencies", dependenciesJSON);
+            acJSON.set("dependencies", dependenciesJSON);
 
             ActivityClusterPlan acp = activityClusterPlanMap.get(ac.getId());
             if (acp == null) {
-                acJSON.put("plan", (Object) null);
+                acJSON.putNull("plan");
             } else {
-                JSONObject planJSON = new JSONObject();
+                ObjectNode planJSON = om.createObjectNode();
 
-                JSONArray acTasks = new JSONArray();
+                ArrayNode acTasks = om.createArrayNode();
                 for (Map.Entry<ActivityId, ActivityPlan> e : acp.getActivityPlanMap().entrySet()) {
                     ActivityPlan acPlan = e.getValue();
-                    JSONObject entry = new JSONObject();
+                    ObjectNode entry = om.createObjectNode();
                     entry.put("activity-id", e.getKey().toString());
 
                     ActivityPartitionDetails apd = acPlan.getActivityPartitionDetails();
                     entry.put("partition-count", apd.getPartitionCount());
 
-                    JSONArray inPartCountsJSON = new JSONArray();
+                    ArrayNode inPartCountsJSON = om.createArrayNode();
                     int[] inPartCounts = apd.getInputPartitionCounts();
                     if (inPartCounts != null) {
                         for (int i : inPartCounts) {
-                            inPartCountsJSON.put(i);
+                            inPartCountsJSON.add(i);
                         }
                     }
-                    entry.put("input-partition-counts", inPartCountsJSON);
+                    entry.set("input-partition-counts", inPartCountsJSON);
 
-                    JSONArray outPartCountsJSON = new JSONArray();
+                    ArrayNode outPartCountsJSON = om.createArrayNode();
                     int[] outPartCounts = apd.getOutputPartitionCounts();
                     if (outPartCounts != null) {
                         for (int o : outPartCounts) {
-                            outPartCountsJSON.put(o);
+                            outPartCountsJSON.add(o);
                         }
                     }
-                    entry.put("output-partition-counts", outPartCountsJSON);
+                    entry.set("output-partition-counts", outPartCountsJSON);
 
-                    JSONArray tasks = new JSONArray();
+                    ArrayNode tasks = om.createArrayNode();
                     for (Task t : acPlan.getTasks()) {
-                        JSONObject task = new JSONObject();
+                        ObjectNode task = om.createObjectNode();
 
                         task.put("task-id", t.getTaskId().toString());
 
-                        JSONArray dependentTasksJSON = new JSONArray();
+                        ArrayNode dependentTasksJSON = om.createArrayNode();
                         for (TaskId dependent : t.getDependents()) {
-                            dependentTasksJSON.put(dependent.toString());
-                        }
-                        task.put("dependents", dependentTasksJSON);
+                            dependentTasksJSON.add(dependent.toString());
+                        task.set("dependents", dependentTasksJSON);
 
-                        JSONArray dependencyTasksJSON = new JSONArray();
+                        ArrayNode dependencyTasksJSON = om.createArrayNode();
                         for (TaskId dependency : t.getDependencies()) {
-                            dependencyTasksJSON.put(dependency.toString());
+                            dependencyTasksJSON.add(dependency.toString());
                         }
-                        task.put("dependencies", dependencyTasksJSON);
+                        task.set("dependencies", dependencyTasksJSON);
 
-                        tasks.put(task);
+                        tasks.add(task);
                     }
-                    entry.put("tasks", tasks);
+                    entry.set("tasks", tasks);
 
-                    acTasks.put(entry);
+                    acTasks.add(entry);
+                    }
                 }
-                planJSON.put("activities", acTasks);
+                planJSON.set("activities", acTasks);
 
-                JSONArray tClusters = new JSONArray();
+                ArrayNode tClusters = om.createArrayNode();
                 for (TaskCluster tc : acp.getTaskClusters()) {
-                    JSONObject c = new JSONObject();
+                    ObjectNode c = om.createObjectNode();
                     c.put("task-cluster-id", String.valueOf(tc.getTaskClusterId()));
 
-                    JSONArray tasks = new JSONArray();
+                    ArrayNode tasksAry = om.createArrayNode();
                     for (Task t : tc.getTasks()) {
-                        tasks.put(t.getTaskId().toString());
+                        tasksAry.add(t.getTaskId().toString());
                     }
-                    c.put("tasks", tasks);
+                    c.set("tasks", tasksAry);
 
-                    JSONArray prodParts = new JSONArray();
+                    ArrayNode prodParts = om.createArrayNode();
                     for (PartitionId p : tc.getProducedPartitions()) {
-                        prodParts.put(p.toString());
+                        prodParts.add(p.toString());
                     }
-                    c.put("produced-partitions", prodParts);
+                    c.set("produced-partitions", prodParts);
 
-                    JSONArray reqdParts = new JSONArray();
+                    ArrayNode reqdParts = om.createArrayNode();
                     for (PartitionId p : tc.getRequiredPartitions()) {
-                        reqdParts.put(p.toString());
+                        reqdParts.add(p.toString());
                     }
-                    c.put("required-partitions", reqdParts);
+                    c.set("required-partitions", reqdParts);
 
-                    JSONArray attempts = new JSONArray();
+                    ArrayNode attempts = om.createArrayNode();
                     List<TaskClusterAttempt> tcAttempts = tc.getAttempts();
                     if (tcAttempts != null) {
                         for (TaskClusterAttempt tca : tcAttempts) {
-                            JSONObject attempt = new JSONObject();
+                            ObjectNode attempt = om.createObjectNode();
                             attempt.put("attempt", tca.getAttempt());
-                            attempt.put("status", tca.getStatus());
+                            attempt.putPOJO("status", tca.getStatus());
                             attempt.put("start-time", tca.getStartTime());
                             attempt.put("end-time", tca.getEndTime());
 
-                            JSONArray taskAttempts = new JSONArray();
+                            ArrayNode taskAttempts = om.createArrayNode();
                             for (TaskAttempt ta : tca.getTaskAttempts().values()) {
-                                JSONObject taskAttempt = new JSONObject();
-                                taskAttempt.put("task-id", ta.getTaskAttemptId().getTaskId());
-                                taskAttempt.put("task-attempt-id", ta.getTaskAttemptId());
-                                taskAttempt.put("status", ta.getStatus());
+                                ObjectNode taskAttempt = om.createObjectNode();
+                                taskAttempt.putPOJO("task-id", ta.getTaskAttemptId().getTaskId());
+                                taskAttempt.putPOJO("task-attempt-id", ta.getTaskAttemptId());
+                                taskAttempt.putPOJO("status", ta.getStatus());
                                 taskAttempt.put("node-id", ta.getNodeId());
                                 taskAttempt.put("start-time", ta.getStartTime());
                                 taskAttempt.put("end-time", ta.getEndTime());
@@ -374,26 +374,26 @@
                                         taskAttempt.put("failure-details", exceptionWriter.toString());
                                     }
                                 }
-                                taskAttempts.put(taskAttempt);
+                                taskAttempts.add(taskAttempt);
                             }
-                            attempt.put("task-attempts", taskAttempts);
+                            attempt.set("task-attempts", taskAttempts);
 
-                            attempts.put(attempt);
+                            attempts.add(attempt);
                         }
                     }
-                    c.put("attempts", attempts);
+                    c.set("attempts", attempts);
 
-                    tClusters.put(c);
+                    tClusters.add(c);
                 }
-                planJSON.put("task-clusters", tClusters);
+                planJSON.set("task-clusters", tClusters);
 
-                acJSON.put("plan", planJSON);
+                acJSON.set("plan", planJSON);
             }
-            aClusters.put(acJSON);
+            aClusters.add(acJSON);
         }
-        result.put("activity-clusters", aClusters);
+        result.set("activity-clusters", aClusters);
 
-        result.put("profile", profile.toJSON());
+        result.set("profile", profile.toJSON());
 
         return result;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/scheduler/JobScheduler.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/scheduler/JobScheduler.java
index ab026eb..b577ff7 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/scheduler/JobScheduler.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/scheduler/JobScheduler.java
@@ -31,9 +31,8 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.json.JSONException;
-import org.json.JSONObject;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.comm.NetworkAddress;
 import org.apache.hyracks.api.constraints.Constraint;
 import org.apache.hyracks.api.constraints.expressions.LValueConstraintExpression;
@@ -80,6 +79,7 @@
 
     private final Set<TaskCluster> inProgressTaskClusters;
 
+
     public JobScheduler(ClusterControllerService ccs, JobRun jobRun, Collection<Constraint> constraints) {
         this.ccs = ccs;
         this.jobRun = jobRun;
@@ -734,15 +734,12 @@
         }
     }
 
-    private JSONObject createJobLogObject(final JobRun run) {
-        JSONObject jobLogObject = new JSONObject();
-        try {
-            ActivityClusterGraph acg = run.getActivityClusterGraph();
-            jobLogObject.put("activity-cluster-graph", acg.toJSON());
-            jobLogObject.put("job-run", run.toJSON());
-        } catch (JSONException e) {
-            throw new RuntimeException(e);
-        }
+    private ObjectNode createJobLogObject(final JobRun run) {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode jobLogObject = om.createObjectNode();
+        ActivityClusterGraph acg = run.getActivityClusterGraph();
+        jobLogObject.set("activity-cluster-graph", acg.toJSON());
+        jobLogObject.set("job-run", run.toJSON());
         return jobLogObject;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java
index bab77ca..e69884a 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java
@@ -18,7 +18,8 @@
  */
 package org.apache.hyracks.control.cc.web;
 
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.control.cc.ClusterControllerService;
@@ -35,8 +36,9 @@
     }
 
     @Override
-    public JSONObject invoke(String[] arguments) throws Exception {
-        JSONObject result = new JSONObject();
+    public ObjectNode invoke(String[] arguments) throws Exception {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode result = om.createObjectNode();
         switch (arguments.length) {
             case 1:
                 if (!"".equals(arguments[0])) {
@@ -45,7 +47,7 @@
             case 0: {
                 GetJobSummariesJSONWork gjse = new GetJobSummariesJSONWork(ccs);
                 ccs.getWorkQueue().scheduleAndSync(gjse);
-                result.put("result", gjse.getSummaries());
+                result.set("result", gjse.getSummaries());
                 break;
             }
 
@@ -55,11 +57,11 @@
                 if ("job-activity-graph".equalsIgnoreCase(arguments[1])) {
                     GetActivityClusterGraphJSONWork gjage = new GetActivityClusterGraphJSONWork(ccs, jobId);
                     ccs.getWorkQueue().scheduleAndSync(gjage);
-                    result.put("result", gjage.getJSON());
+                    result.set("result", gjage.getJSON());
                 } else if ("job-run".equalsIgnoreCase(arguments[1])) {
                     GetJobRunJSONWork gjre = new GetJobRunJSONWork(ccs, jobId);
                     ccs.getWorkQueue().scheduleAndSync(gjre);
-                    result.put("result", gjre.getJSON());
+                    result.set("result", gjre.getJSON());
                 }
 
                 break;
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java
index 58deb55..8994895 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java
@@ -18,7 +18,8 @@
  */
 package org.apache.hyracks.control.cc.web;
 
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.hyracks.control.cc.ClusterControllerService;
 import org.apache.hyracks.control.cc.web.util.IJSONOutputFunction;
@@ -33,19 +34,20 @@
     }
 
     @Override
-    public JSONObject invoke(String[] arguments) throws Exception {
-        JSONObject result = new JSONObject();
+    public ObjectNode invoke(String[] arguments) throws Exception {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode result = om.createObjectNode();
         switch (arguments.length) {
             case 1: {
                 if ("".equals(arguments[0])) {
                     GetNodeSummariesJSONWork gnse = new GetNodeSummariesJSONWork(ccs);
                     ccs.getWorkQueue().scheduleAndSync(gnse);
-                    result.put("result", gnse.getSummaries());
+                    result.set("result", gnse.getSummaries());
                 } else {
                     String nodeId = arguments[0];
                     GetNodeDetailsJSONWork gnde = new GetNodeDetailsJSONWork(ccs, nodeId, true, true);
                     ccs.getWorkQueue().scheduleAndSync(gnde);
-                    result.put("result", gnde.getDetail());
+                    result.set("result", gnde.getDetail());
                 }
             }
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java
index 000cf46..0657f59 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java
@@ -20,7 +20,8 @@
 
 import java.util.Map;
 
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.hyracks.control.cc.ClusterControllerService;
 import org.apache.hyracks.control.cc.web.util.IJSONOutputFunction;
@@ -35,13 +36,14 @@
     }
 
     @Override
-    public JSONObject invoke(String[] arguments) throws Exception {
+    public ObjectNode invoke(String[] arguments) throws Exception {
         GatherStateDumpsWork gsdw = new GatherStateDumpsWork(ccs);
         ccs.getWorkQueue().scheduleAndSync(gsdw);
         StateDumpRun sdr = gsdw.getStateDumpRun();
         sdr.waitForCompletion();
 
-        JSONObject result = new JSONObject();
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode result = om.createObjectNode();
         for (Map.Entry<String, String> e : sdr.getStateDump().entrySet()) {
             result.put(e.getKey(), e.getValue());
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java
index f55bf84..ab0a581 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java
@@ -18,8 +18,8 @@
  */
 package org.apache.hyracks.control.cc.web.util;
 
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public interface IJSONOutputFunction {
-    public JSONObject invoke(String[] arguments) throws Exception;
+    public ObjectNode invoke(String[] arguments) throws Exception;
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java
index b00eeae..e736406 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java
@@ -24,9 +24,10 @@
 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.eclipse.jetty.server.Request;
 import org.eclipse.jetty.server.handler.AbstractHandler;
-import org.json.JSONObject;
 
 public class JSONOutputRequestHandler extends AbstractHandler {
     private final IJSONOutputFunction fn;
@@ -46,9 +47,10 @@
         }
         String[] parts = target.split("/");
         try {
-            JSONObject result = fn.invoke(parts);
+            ObjectNode result = fn.invoke(parts);
             response.setContentType("application/json");
-            result.write(response.getWriter());
+            ObjectMapper om = new ObjectMapper();
+            om.writer().writeValue(response.getWriter(),result);
             baseRequest.setHandled(true);
         } catch (Exception e) {
             e.printStackTrace();
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONUtils.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONUtils.java
deleted file mode 100644
index 5da4d9d..0000000
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONUtils.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.hyracks.control.cc.web.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-public class JSONUtils {
-    public static List<JSONObject> toList(JSONArray array) throws JSONException {
-        List<JSONObject> list = new ArrayList<JSONObject>();
-        for (int i = 0; i < array.length(); ++i) {
-            list.add((JSONObject) array.get(i));
-        }
-        return list;
-    }
-}
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetActivityClusterGraphJSONWork.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetActivityClusterGraphJSONWork.java
index 951e67e..294ae97 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetActivityClusterGraphJSONWork.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetActivityClusterGraphJSONWork.java
@@ -18,7 +18,8 @@
  */
 package org.apache.hyracks.control.cc.work;
 
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.control.cc.ClusterControllerService;
@@ -28,7 +29,7 @@
 public class GetActivityClusterGraphJSONWork extends SynchronizableWork {
     private final ClusterControllerService ccs;
     private final JobId jobId;
-    private JSONObject json;
+    private ObjectNode json;
 
     public GetActivityClusterGraphJSONWork(ClusterControllerService ccs, JobId jobId) {
         this.ccs = ccs;
@@ -37,18 +38,20 @@
 
     @Override
     protected void doRun() throws Exception {
+
+        ObjectMapper om = new ObjectMapper();
         JobRun run = ccs.getActiveRunMap().get(jobId);
         if (run == null) {
             run = ccs.getRunMapArchive().get(jobId);
             if (run == null) {
-                json = new JSONObject();
+                json = om.createObjectNode();
                 return;
             }
         }
         json = run.getActivityClusterGraph().toJSON();
     }
 
-    public JSONObject getJSON() {
+    public ObjectNode getJSON() {
         return json;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobRunJSONWork.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobRunJSONWork.java
index f2119c3..aad6edf 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobRunJSONWork.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobRunJSONWork.java
@@ -18,7 +18,8 @@
  */
 package org.apache.hyracks.control.cc.work;
 
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.control.cc.ClusterControllerService;
@@ -28,7 +29,7 @@
 public class GetJobRunJSONWork extends SynchronizableWork {
     private final ClusterControllerService ccs;
     private final JobId jobId;
-    private JSONObject json;
+    private ObjectNode json;
 
     public GetJobRunJSONWork(ClusterControllerService ccs, JobId jobId) {
         this.ccs = ccs;
@@ -37,18 +38,19 @@
 
     @Override
     protected void doRun() throws Exception {
+        ObjectMapper om = new ObjectMapper();
         JobRun run = ccs.getActiveRunMap().get(jobId);
         if (run == null) {
             run = ccs.getRunMapArchive().get(jobId);
             if (run == null) {
-                json = new JSONObject();
+                json = om.createObjectNode();
                 return;
             }
         }
         json = run.toJSON();
     }
 
-    public JSONObject getJSON() {
+    public ObjectNode getJSON() {
         return json;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobSummariesJSONWork.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobSummariesJSONWork.java
index bc4468a..1e5a3a5 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobSummariesJSONWork.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetJobSummariesJSONWork.java
@@ -20,17 +20,16 @@
 
 import java.util.Collection;
 
-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.hyracks.control.cc.ClusterControllerService;
 import org.apache.hyracks.control.cc.job.JobRun;
 import org.apache.hyracks.control.common.work.SynchronizableWork;
 
 public class GetJobSummariesJSONWork extends SynchronizableWork {
     private final ClusterControllerService ccs;
-    private JSONArray summaries;
+    private ArrayNode summaries;
 
     public GetJobSummariesJSONWork(ClusterControllerService ccs) {
         this.ccs = ccs;
@@ -38,25 +37,27 @@
 
     @Override
     protected void doRun() throws Exception {
-        summaries = new JSONArray();
+        ObjectMapper om = new ObjectMapper();
+        summaries = om.createArrayNode();
         populateJSON(ccs.getActiveRunMap().values());
         populateJSON(ccs.getRunMapArchive().values());
     }
 
-    private void populateJSON(Collection<JobRun> jobRuns) throws JSONException {
+    private void populateJSON(Collection<JobRun> jobRuns)  {
+        ObjectMapper om = new ObjectMapper();
         for (JobRun run : jobRuns) {
-            JSONObject jo = new JSONObject();
+            ObjectNode jo = om.createObjectNode();
             jo.put("type", "job-summary");
             jo.put("job-id", run.getJobId().toString());
             jo.put("create-time", run.getCreateTime());
             jo.put("start-time", run.getStartTime());
             jo.put("end-time", run.getEndTime());
             jo.put("status", run.getStatus().toString());
-            summaries.put(jo);
+            summaries.add(jo);
         }
     }
 
-    public JSONArray getSummaries() {
+    public ArrayNode getSummaries() {
         return summaries;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeDetailsJSONWork.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeDetailsJSONWork.java
index dab41ba..4a8dd1f 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeDetailsJSONWork.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeDetailsJSONWork.java
@@ -35,13 +35,13 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.control.cc.ClusterControllerService;
 import org.apache.hyracks.control.cc.NodeControllerState;
 import org.apache.hyracks.control.common.utils.PidHelper;
 import org.apache.hyracks.control.common.work.IPCResponder;
 import org.apache.hyracks.control.common.work.SynchronizableWork;
-import org.json.JSONException;
-import org.json.JSONObject;
 import org.kohsuke.args4j.Option;
 
 public class GetNodeDetailsJSONWork extends SynchronizableWork {
@@ -51,7 +51,8 @@
     private final boolean includeStats;
     private final boolean includeConfig;
     private final IPCResponder<String> callback;
-    private JSONObject detail;
+    private ObjectNode detail;
+    private ObjectMapper om = new ObjectMapper();
 
     public GetNodeDetailsJSONWork(ClusterControllerService ccs, String nodeId, boolean includeStats,
                                   boolean includeConfig, IPCResponder<String> callback) {
@@ -86,12 +87,12 @@
         }
 
         if (callback != null) {
-            callback.setValue(detail == null ? null : detail.toString());
+            callback.setValue(detail == null ? null : om.writeValueAsString(detail));
         }
     }
 
-    private JSONObject getCCDetails() throws JSONException {
-        JSONObject o = new JSONObject();
+    private ObjectNode getCCDetails()  {
+        ObjectNode o = om.createObjectNode();
         MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
         List<GarbageCollectorMXBean> gcMXBeans = ManagementFactory.getGarbageCollectorMXBeans();
         ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
@@ -106,29 +107,29 @@
             o.put("vm_name", runtimeMXBean.getVmName());
             o.put("vm_version", runtimeMXBean.getVmVersion());
             o.put("vm_vendor", runtimeMXBean.getVmVendor());
-            o.put("classpath", runtimeMXBean.getClassPath().split(File.pathSeparator));
-            o.put("library_path", runtimeMXBean.getLibraryPath().split(File.pathSeparator));
-            o.put("boot_classpath", runtimeMXBean.getBootClassPath().split(File.pathSeparator));
-            o.put("input_arguments", runtimeMXBean.getInputArguments());
-            o.put("system_properties", runtimeMXBean.getSystemProperties());
+            o.putPOJO("classpath", runtimeMXBean.getClassPath().split(File.pathSeparator));
+            o.putPOJO("library_path", runtimeMXBean.getLibraryPath().split(File.pathSeparator));
+            o.putPOJO("boot_classpath", runtimeMXBean.getBootClassPath().split(File.pathSeparator));
+            o.putPOJO("input_arguments", runtimeMXBean.getInputArguments());
+            o.putPOJO("system_properties", runtimeMXBean.getSystemProperties());
             o.put("pid", PidHelper.getPid());
         }
         if (includeStats) {
             MemoryUsage heapUsage = memoryMXBean.getHeapMemoryUsage();
             MemoryUsage nonheapUsage = memoryMXBean.getNonHeapMemoryUsage();
 
-            List<JSONObject> gcs = new ArrayList<>();
+            List<ObjectNode> gcs = new ArrayList<>();
 
             for (GarbageCollectorMXBean gcMXBean : gcMXBeans) {
-                JSONObject gc = new JSONObject();
+                ObjectNode gc = om.createObjectNode();
                 gc.put("name", gcMXBean.getName());
                 gc.put("collection-time", gcMXBean.getCollectionTime());
                 gc.put("collection-count", gcMXBean.getCollectionCount());
                 gcs.add(gc);
             }
-            o.put("gcs", gcs);
+            o.putPOJO("gcs", gcs);
 
-            o.put("date", new Date());
+            o.put("date", new Date().toString());
             o.put("heap_init_size", heapUsage.getInit());
             o.put("heap_used_size", heapUsage.getUsed());
             o.put("heap_committed_size", heapUsage.getCommitted());
@@ -145,7 +146,7 @@
         return o;
     }
 
-    private static void addIni(JSONObject o, Object configBean) throws JSONException {
+    private static void addIni(ObjectNode o, Object configBean)  {
         Map<String, Object> iniMap = new HashMap<>();
         for (Field f : configBean.getClass().getFields()) {
             Option option = f.getAnnotation(Option.class);
@@ -170,10 +171,10 @@
                 }
             }
         }
-        o.put("ini", iniMap);
+        o.putPOJO("ini", iniMap);
     }
 
-    public JSONObject getDetail() {
+    public ObjectNode getDetail() {
         return detail;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeSummariesJSONWork.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeSummariesJSONWork.java
index 4b81ad0..ebafd7d 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeSummariesJSONWork.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/GetNodeSummariesJSONWork.java
@@ -18,7 +18,8 @@
  */
 package org.apache.hyracks.control.cc.work;
 
-import org.json.JSONArray;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 
 import org.apache.hyracks.control.cc.ClusterControllerService;
 import org.apache.hyracks.control.cc.NodeControllerState;
@@ -26,7 +27,7 @@
 
 public class GetNodeSummariesJSONWork extends SynchronizableWork {
     private final ClusterControllerService ccs;
-    private JSONArray summaries;
+    private ArrayNode summaries;
 
     public GetNodeSummariesJSONWork(ClusterControllerService ccs) {
         this.ccs = ccs;
@@ -34,13 +35,14 @@
 
     @Override
     protected void doRun() throws Exception {
-        summaries = new JSONArray();
+        ObjectMapper om = new ObjectMapper();
+        summaries = om.createArrayNode();
         for (NodeControllerState ncs : ccs.getNodeMap().values()) {
-            summaries.put(ncs.toSummaryJSON());
+            summaries.add(ncs.toSummaryJSON());
         }
     }
 
-    public JSONArray getSummaries() {
+    public ArrayNode getSummaries() {
         return summaries;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/JobCleanupWork.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/JobCleanupWork.java
index bd85463..2a383b6 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/JobCleanupWork.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/JobCleanupWork.java
@@ -23,9 +23,8 @@
 import java.util.Set;
 import java.util.logging.Logger;
 
-import org.json.JSONException;
-import org.json.JSONObject;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.exceptions.HyracksException;
 import org.apache.hyracks.api.job.ActivityClusterGraph;
 import org.apache.hyracks.api.job.JobId;
@@ -123,15 +122,12 @@
         }
     }
 
-    private JSONObject createJobLogObject(final JobRun run) {
-        JSONObject jobLogObject = new JSONObject();
-        try {
-            ActivityClusterGraph acg = run.getActivityClusterGraph();
-            jobLogObject.put("activity-cluster-graph", acg.toJSON());
-            jobLogObject.put("job-run", run.toJSON());
-        } catch (JSONException e) {
-            throw new RuntimeException(e);
-        }
+    private ObjectNode createJobLogObject(final JobRun run) {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode jobLogObject = om.createObjectNode();
+        ActivityClusterGraph acg = run.getActivityClusterGraph();
+        jobLogObject.set("activity-cluster-graph", acg.toJSON());
+        jobLogObject.set("job-run", run.toJSON());
         return jobLogObject;
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml
index 9f7d9dd..1c8ae20 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml
@@ -58,11 +58,6 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore</artifactId>
       <version>4.4.5</version>
@@ -72,5 +67,9 @@
       <artifactId>httpclient</artifactId>
       <version>4.5.2</version>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/AbstractProfile.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/AbstractProfile.java
index 525be8c..d1d33a5 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/AbstractProfile.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/AbstractProfile.java
@@ -26,9 +26,9 @@
 import java.util.Map;
 import java.util.Map.Entry;
 
-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.hyracks.api.io.IWritable;
 
@@ -45,17 +45,18 @@
         return counters;
     }
 
-    public abstract JSONObject toJSON() throws JSONException;
+    public abstract ObjectNode toJSON() ;
 
-    protected void populateCounters(JSONObject jo) throws JSONException {
-        JSONArray countersObj = new JSONArray();
+    protected void populateCounters(ObjectNode jo) {
+        ObjectMapper om = new ObjectMapper();
+        ArrayNode countersObj = om.createArrayNode();
         for (Map.Entry<String, Long> e : counters.entrySet()) {
-            JSONObject jpe = new JSONObject();
+            ObjectNode jpe = om.createObjectNode();
             jpe.put("name", e.getKey());
             jpe.put("value", e.getValue());
-            countersObj.put(jpe);
+            countersObj.add(jpe);
         }
-        jo.put("counters", countersObj);
+        jo.set("counters", countersObj);
     }
 
     protected void merge(AbstractProfile profile) {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobProfile.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobProfile.java
index e8fec1b..79a5538 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobProfile.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobProfile.java
@@ -25,10 +25,9 @@
 import java.util.Map;
 import java.util.Map.Entry;
 
-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.hyracks.api.job.JobId;
 
 public class JobProfile extends AbstractProfile {
@@ -62,16 +61,17 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("job-id", jobId.toString());
         populateCounters(json);
-        JSONArray jobletsArray = new JSONArray();
+        ArrayNode jobletsArray = om.createArrayNode();
         for (JobletProfile p : jobletProfiles.values()) {
-            jobletsArray.put(p.toJSON());
+            jobletsArray.add(p.toJSON());
         }
-        json.put("joblets", jobletsArray);
+        json.set("joblets", jobletsArray);
 
         return json;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobletProfile.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobletProfile.java
index 33d5a6c..c3792df 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobletProfile.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/JobletProfile.java
@@ -25,10 +25,10 @@
 import java.util.Map;
 import java.util.Map.Entry;
 
-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.hyracks.api.dataflow.TaskAttemptId;
 
 public class JobletProfile extends AbstractProfile {
@@ -62,16 +62,18 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("node-id", nodeId.toString());
         populateCounters(json);
-        JSONArray tasks = new JSONArray();
+        ArrayNode tasks = om.createArrayNode();
         for (TaskProfile p : taskProfiles.values()) {
-            tasks.put(p.toJSON());
+            tasks.add(p.toJSON());
         }
-        json.put("tasks", tasks);
+        json.set("tasks", tasks);
 
         return json;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/TaskProfile.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/TaskProfile.java
index a77c56f..680d2f9 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/TaskProfile.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/job/profiling/om/TaskProfile.java
@@ -25,10 +25,9 @@
 import java.util.Map;
 import java.util.Map.Entry;
 
-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.hyracks.api.dataflow.TaskAttemptId;
 import org.apache.hyracks.api.partitions.PartitionId;
 import org.apache.hyracks.control.common.job.profiling.counters.MultiResolutionEventProfiler;
@@ -64,39 +63,41 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject json = new JSONObject();
+    public ObjectNode toJSON()  {
+
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
 
         json.put("activity-id", taskAttemptId.getTaskId().getActivityId().toString());
         json.put("partition", taskAttemptId.getTaskId().getPartition());
         json.put("attempt", taskAttemptId.getAttempt());
         if (partitionSendProfile != null) {
-            JSONArray pspArray = new JSONArray();
+            ArrayNode pspArray = om.createArrayNode();
             for (PartitionProfile pp : partitionSendProfile.values()) {
-                JSONObject ppObj = new JSONObject();
+                ObjectNode ppObj = om.createObjectNode();
                 PartitionId pid = pp.getPartitionId();
-                JSONObject pidObj = new JSONObject();
-                pidObj.put("job-id", pid.getJobId());
-                pidObj.put("connector-id", pid.getConnectorDescriptorId());
+                ObjectNode pidObj = om.createObjectNode();
+                pidObj.put("job-id", pid.getJobId().toString());
+                pidObj.put("connector-id", pid.getConnectorDescriptorId().toString());
                 pidObj.put("sender-index", pid.getSenderIndex());
                 pidObj.put("receiver-index", pid.getReceiverIndex());
-                ppObj.put("partition-id", pidObj);
+                ppObj.set("partition-id", pidObj);
                 ppObj.put("open-time", pp.getOpenTime());
                 ppObj.put("close-time", pp.getCloseTime());
                 MultiResolutionEventProfiler samples = pp.getSamples();
                 ppObj.put("offset", samples.getOffset());
                 int resolution = samples.getResolution();
                 int sampleCount = samples.getCount();
-                JSONArray ftA = new JSONArray();
+                ArrayNode ftA = om.createArrayNode();
                 int[] ft = samples.getSamples();
                 for (int i = 0; i < sampleCount; ++i) {
-                    ftA.put(ft[i]);
+                    ftA.add(ft[i]);
                 }
-                ppObj.put("frame-times", ftA);
+                ppObj.set("frame-times", ftA);
                 ppObj.put("resolution", resolution);
-                pspArray.put(ppObj);
+                pspArray.add(ppObj);
             }
-            json.put("partition-send-profile", pspArray);
+            json.set("partition-send-profile", pspArray);
         }
         populateCounters(json);
 
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/logs/LogFile.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/logs/LogFile.java
index 8f95c35..c0f88eb 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/logs/LogFile.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/logs/LogFile.java
@@ -18,12 +18,12 @@
  */
 package org.apache.hyracks.control.common.logs;
 
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.PrintWriter;
 
-import org.json.JSONObject;
-
 public class LogFile {
     private final File root;
 
@@ -38,12 +38,12 @@
         openTime = System.currentTimeMillis();
     }
 
-    public synchronized void log(JSONObject object) throws Exception {
+    public synchronized void log(ObjectNode object) throws Exception {
         if (out == null) {
             root.mkdirs();
             out = new PrintWriter(new FileOutputStream(new File(root, openTime + ".log"), true));
         }
-        out.println(object.toString(1));
+        out.println(object.asText());
         out.flush();
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/utils/ThreadDumpHelper.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/utils/ThreadDumpHelper.java
index eacb9e0..1d6dbcd 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/utils/ThreadDumpHelper.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/utils/ThreadDumpHelper.java
@@ -18,6 +18,13 @@
  */
 package org.apache.hyracks.control.common.utils;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.io.IOException;
 import java.lang.management.ThreadInfo;
 import java.lang.management.ThreadMXBean;
 import java.util.ArrayList;
@@ -26,15 +33,12 @@
 import java.util.List;
 import java.util.Map;
 
-import org.json.JSONException;
-import org.json.JSONObject;
-
 public class ThreadDumpHelper {
 
     private ThreadDumpHelper() {
     }
 
-    public static String takeDumpJSON(ThreadMXBean threadMXBean) throws JSONException {
+    public static String takeDumpJSON(ThreadMXBean threadMXBean) throws IOException {
         ThreadInfo[] threadInfos = threadMXBean.dumpAllThreads(true, true);
         List<Map<String, Object>> threads = new ArrayList<>();
 
@@ -69,18 +73,20 @@
             }
             threads.add(threadMap);
         }
-        JSONObject json = new JSONObject();
-        json.put("date", new Date());
-        json.put("threads", threads);
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode json = om.createObjectNode();
+        json.put("date", new Date().toString());
+        json.putPOJO("threads", threads);
 
-        long [] deadlockedThreads = threadMXBean.findDeadlockedThreads();
-        long [] monitorDeadlockedThreads = threadMXBean.findMonitorDeadlockedThreads();
+        long[] deadlockedThreads = threadMXBean.findDeadlockedThreads();
+        long[] monitorDeadlockedThreads = threadMXBean.findMonitorDeadlockedThreads();
         if (deadlockedThreads != null && deadlockedThreads.length > 0) {
-            json.put("deadlocked_thread_ids", deadlockedThreads);
+            json.putPOJO("deadlocked_thread_ids", deadlockedThreads);
         }
         if (monitorDeadlockedThreads != null && monitorDeadlockedThreads.length > 0) {
-            json.put("monitor_deadlocked_thread_ids", monitorDeadlockedThreads);
+            json.putPOJO("monitor_deadlocked_thread_ids", monitorDeadlockedThreads);
         }
-        return json.toString();
+        om.enable(SerializationFeature.INDENT_OUTPUT);
+        return om.writerWithDefaultPrettyPrinter().writeValueAsString(json);
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml b/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
index e44feb7..0158068 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
@@ -48,11 +48,6 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-data-std</artifactId>
       <version>${project.version}</version>
@@ -90,5 +85,9 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractConnectorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractConnectorDescriptor.java
index e780ea0..6b8b38f 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractConnectorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractConnectorDescriptor.java
@@ -18,14 +18,15 @@
  */
 package org.apache.hyracks.dataflow.std.base;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.application.ICCApplicationContext;
 import org.apache.hyracks.api.constraints.IConstraintAcceptor;
 import org.apache.hyracks.api.dataflow.ConnectorDescriptorId;
 import org.apache.hyracks.api.dataflow.IConnectorDescriptor;
 import org.apache.hyracks.api.job.ActivityCluster;
 import org.apache.hyracks.api.job.IConnectorDescriptorRegistry;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 public abstract class AbstractConnectorDescriptor implements IConnectorDescriptor {
     private static final long serialVersionUID = 1L;
@@ -54,8 +55,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject jconn = new JSONObject();
+    public JsonNode toJSON() {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode jconn = om.createObjectNode();
 
         jconn.put("id", String.valueOf(getConnectorId()));
         jconn.put("java-class", getClass().getName());
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java
index 4f22a17..a18328e 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java
@@ -18,14 +18,14 @@
  */
 package org.apache.hyracks.dataflow.std.base;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.hyracks.api.application.ICCApplicationContext;
 import org.apache.hyracks.api.constraints.IConstraintAcceptor;
 import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
 import org.apache.hyracks.api.dataflow.OperatorDescriptorId;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 public abstract class AbstractOperatorDescriptor implements IOperatorDescriptor {
     private static final long serialVersionUID = 1L;
@@ -91,8 +91,9 @@
     }
 
     @Override
-    public JSONObject toJSON() throws JSONException {
-        JSONObject jop = new JSONObject();
+    public ObjectNode toJSON()  {
+        ObjectMapper om = new ObjectMapper();
+        ObjectNode jop = om.createObjectNode();
         jop.put("id", String.valueOf(getOperatorId()));
         jop.put("java-class", getClass().getName());
         jop.put("in-arity", getInputArity());
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
index 1a5d4ab..d934e8c 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
@@ -137,11 +137,6 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.12</version>
@@ -152,5 +147,9 @@
       <artifactId>hyracks-storage-common</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java
index fe9c1ea..b51a578 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java
@@ -137,7 +137,7 @@
 
     protected JobId executeTest(JobSpecification spec) throws Exception {
         if (LOGGER.isLoggable(Level.INFO)) {
-            LOGGER.info(spec.toJSON().toString(2));
+            LOGGER.info(spec.toJSON().asText());
         }
         JobId jobId = hcc.startJob(spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
         if (LOGGER.isLoggable(Level.INFO)) {
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
index 890ab0a..4163e46 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
@@ -26,6 +26,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.commons.io.FileUtils;
 import org.apache.hyracks.api.client.HyracksConnection;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
@@ -45,7 +46,7 @@
 import org.apache.hyracks.control.nc.resources.memory.FrameManager;
 import org.apache.hyracks.dataflow.common.comm.io.ResultFrameTupleAccessor;
 import org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
-import org.json.JSONArray;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -123,7 +124,7 @@
 
     protected void runTest(JobSpecification spec) throws Exception {
         if (LOGGER.isLoggable(Level.INFO)) {
-            LOGGER.info(spec.toJSON().toString(2));
+            LOGGER.info(spec.toJSON().asText());
         }
         JobId jobId = hcc.startJob(spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
         if (LOGGER.isLoggable(Level.INFO)) {
@@ -141,7 +142,8 @@
             IHyracksDataset hyracksDataset = new HyracksDataset(hcc, spec.getFrameSize(), nReaders);
             IHyracksDatasetReader reader = hyracksDataset.createReader(jobId, spec.getResultSetIds().get(0));
 
-            JSONArray resultRecords = new JSONArray();
+            ObjectMapper om = new ObjectMapper();
+            ArrayNode resultRecords = om.createArrayNode();
             ByteBufferInputStream bbis = new ByteBufferInputStream();
 
             int readSize = reader.read(resultFrame);
@@ -156,7 +158,7 @@
                         bbis.setByteBuffer(resultFrame.getBuffer(), start);
                         byte[] recordBytes = new byte[length];
                         bbis.read(recordBytes, 0, length);
-                        resultRecords.put(new String(recordBytes, 0, length));
+                        resultRecords.add(new String(recordBytes, 0, length));
                     }
                 } finally {
                     try {
diff --git a/hyracks-fullstack/hyracks/hyracks-server/pom.xml b/hyracks-fullstack/hyracks/hyracks-server/pom.xml
index 70e47fe..3667951 100644
--- a/hyracks-fullstack/hyracks/hyracks-server/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-server/pom.xml
@@ -164,11 +164,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore</artifactId>
       <version>4.4.5</version>
@@ -183,5 +178,9 @@
       <artifactId>hyracks-control-nc</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java b/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
index 8d1246b..2185826 100644
--- a/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
+++ b/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
@@ -23,6 +23,8 @@
 import java.net.InetAddress;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import junit.framework.Assert;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.HttpResponse;
@@ -32,8 +34,8 @@
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
 import org.apache.hyracks.server.process.HyracksVirtualCluster;
-import org.json.JSONArray;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -111,15 +113,17 @@
     @Test
     public void IsNodelistCorrect() throws Exception {
         // Ping the nodelist HTTP API
+
+        ObjectMapper om = new ObjectMapper();
         String localhost = InetAddress.getLoopbackAddress().getHostAddress();
         String response = getHttp("http://" + localhost + ":12345/rest/nodes");
-        JSONObject result = new JSONObject(response);
-        JSONArray nodes = result.getJSONArray("result");
-        int numNodes = nodes.length();
+        JsonNode result = om.readTree(response);
+        JsonNode nodes = result.get("result");
+        int numNodes = nodes.size();
         Assert.assertEquals("Wrong number of nodes!", 2, numNodes);
-        for (int i = 0; i < nodes.length(); i++) {
-            JSONObject node = nodes.getJSONObject(i);
-            String id = node.getString("node-id");
+        for (int i = 0; i < nodes.size(); i++) {
+            JsonNode node = nodes.get(i);
+            String id = node.get("node-id").asText();
             if (id.equals("red") || id.equals("blue")) {
                 continue;
             }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml b/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml
index 5aebb22..724df9e 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml
@@ -46,10 +46,5 @@
       <artifactId>hyracks-api</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.hyracks</groupId>
-      <artifactId>hyracks-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml
index 9cd9841..7390905 100644
--- a/hyracks-fullstack/pom.xml
+++ b/hyracks-fullstack/pom.xml
@@ -108,6 +108,16 @@
         <artifactId>commons-io</artifactId>
         <version>${commons.io.version}</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>
 
