Method to deserialize the CDCQueryResponse object

@param jsonNode
@return CDCResponse
975389
private CDCResponse getCDCQueryResponse(JsonNode jsonNode) throws IOException {
		ObjectMapper mapper = new ObjectMapper();

		SimpleModule simpleModule = new SimpleModule("CDCQueryResponseDeserializer", new Version(1, 0, 0, null));
		simpleModule.addDeserializer(CDCResponse.class, new CDCQueryResponseDeserializer());

		mapper.registerModule(simpleModule);

		return mapper.treeToValue(jsonNode, CDCResponse.class);
	}
345082
@Override
    public MessageResponse deserialize(JsonElement element, Type alsoIgnored, JsonDeserializationContext ignored) {
        List<String> results = new ArrayList<String>();
        String reason = "";
        String details = "";

        JsonObject body = element.getAsJsonObject();
        boolean succeeded = body.get("outcome").getAsString().equals("SUCCESS");

        if (succeeded) {
            if (body.get("results") != null) {
                for (JsonElement result : body.get("results").getAsJsonArray()) {
                    if(result.isJsonNull()) results.add(null);
                    else if(result.isJsonObject()) results.add(result.toString());
                    else results.add(result.getAsString());
                }
            }
        } else {
            reason = body.get("reason").getAsString();
            details = body.get("details").getAsString();
        }
        return new MessageResponse(succeeded, results, reason, details);
    }
166910
public JsonNode apply(final JsonNode node) {
        requireNonNull(node, "node");
        JsonNode ret = node.deepCopy();
        for (final JsonPatchOperation operation : operations) {
            ret = operation.apply(ret);
        }

        return ret;
    }
1065495
@Override
  public BrIdsDTO deserialize(final JsonElement aElement, final Type aType,
      final JsonDeserializationContext aContext) {
    final BrIdsDTO results = new BrIdsDTO();

    final JsonObject baseObject = aElement.getAsJsonObject();
    final Optional<JsonArray> edges = getEdges(baseObject);
    if (edges.isPresent()) {
      for (final JsonElement edge : edges.get()) {
        final JsonObject ebdgeObj = edge.getAsJsonObject();
        if (ebdgeObj.has(JSON_ELEMENT_NODE)) {
          final JsonObject node = ebdgeObj.getAsJsonObject(JSON_ELEMENT_NODE);
          if (node.has(JSON_ELEMENT_ID)) {
            results.add(node.get(JSON_ELEMENT_ID).getAsString());
          }
        }
      }
    }

    return results;
  }
1014294
function parseNodeValue(node) {
  const childNodes = node && node.childNodes && [...node.childNodes];
  if (!childNodes) {
    return {};
  }

  // Trying to find and parse CDATA as JSON
  const cdatas = childNodes.filter((childNode) => childNode.nodeName === '#cdata-section');
  if (cdatas && cdatas.length > 0) {
    try {
      return JSON.parse(cdatas[0].data);
    } catch (e) {}
  }

  // Didn't find any CDATA or failed to parse it as JSON
  return childNodes.reduce((previousText, childNode) => {
    let nodeText = '';
    switch (childNode.nodeName) {
      case '#text':
        nodeText = childNode.textContent.trim();
        break;
      case '#cdata-section':
        nodeText = childNode.data;
        break;
    }
    return previousText + nodeText;
  }, '');
}
976001
private String getCDCQueryJson(CDCQuery cdcQuery) throws SerializationException {
		ObjectMapper mapper = getObjectMapper();
		String json = null;
		try {
			json = mapper.writeValueAsString(cdcQuery);
		} catch (Exception e) {
			throw new SerializationException(e);
		}

		return json;
	}
220654
public static Node convertToJson(Object source, String label, boolean lenient) {
        if (source instanceof JsonSource) {
            return converter.convertToNode(((JsonSource) source).getJson(), label, lenient);
        } else {
            return converter.convertToNode(source, label, lenient);
        }
    }
1197874
public JsonNode getDataAttrs() {
        Lock lock = lockForRead();
        try {
            if (dataJson == null || dataJson instanceof NullNode
                    || dataJson instanceof MissingNode) {
                return null;
            }
            return dataJson.deepCopy();
        } finally {
            lock.unlock();
        }
    }
408833
public static JsonNode toJson(Object obj, ClassLoader classLoader) {
        return SerializationUtils.toJson(obj, classLoader);
    }
929218
public static Node requiredNode(Model mo, JSONObject o, String id) throws JSONConverterException {
        checkKeys(o, id);
        try {
            return getNode(mo, (Integer) o.get(id));
        } catch (ClassCastException e) {
            throw new JSONConverterException("Unable to read a Node identifier from string at key '" + id + "'", e);
        }
    }
812721
private String convertToString(JsonNode jsonArrayNode) {

		StringBuilder strBuilder = new StringBuilder();
		Iterator<JsonNode> nodeIterator = jsonArrayNode.iterator();
		while (nodeIterator.hasNext()) {
			JsonNode jsonNode = (JsonNode) nodeIterator.next();
			strBuilder.append(jsonNode.asText());
			if (nodeIterator.hasNext()) {
				strBuilder.append(ARRAY_VALUE_SEPARATOR);
			}
		}
		return strBuilder.toString();
	}
603192
public static MatDesc parse(String matdesc)
  {
    if (matdesc == null)
    {
      return null;
    }
    try
    {
      JsonNode jsonNode = mapper.readTree(matdesc);
      JsonNode queryIdNode = jsonNode.path(QUERY_ID);
      if (queryIdNode.isMissingNode() || queryIdNode.isNull())
      {
        return null;
      }
      JsonNode smkIdNode = jsonNode.path(SMK_ID);
      if (smkIdNode.isMissingNode() || smkIdNode.isNull())
      {
        return null;
      }
      String queryId = queryIdNode.asText();
      long smkId = smkIdNode.asLong();
      JsonNode keySizeNode = jsonNode.path(KEY_SIZE);
      if (!keySizeNode.isMissingNode() && !keySizeNode.isNull())
      {
        return new MatDesc(smkId, queryId, keySizeNode.asInt());
      }
      return new MatDesc(smkId, queryId);
    }
    catch (Exception ex)
    {
      return null;
    }
  }
51230
public static JsonNode toJson(final Object data) {
        if (data == null) {
            return newObject();
        }

        try {
            return createObjectMapper().valueToTree(data);
        } catch (Exception e) {
            throw new ParseException(e);
        }
    }
456150
public JsonNode toJson() {
		ObjectNode node = new ObjectMapper().createObjectNode();
		node.put("code", code);
		if (format != null) {
			node.put("format", format);
		}
		return node;
	}
557855
protected Object readResponse(Type returnType, JsonNode jsonObject) throws Throwable {
		return readResponse(returnType, jsonObject, null);
	}
693063
public JSONObject asJSONObject()
    {
        if ( entity == null ) {
            return null;
        }
        String str = asString();
        try {
            return new JSONObject( str );
        } catch ( JSONException ex ) {
            throw new CStorageException( "Error parsing the JSON response: " + str, ex );
        }
    }
191846
private ObjectNode createResponseSuccess(String jsonRpc, Object id, JsonNode result) {
		ObjectNode response = mapper.createObjectNode();
		response.put(JSONRPC, jsonRpc);
		if (Integer.class.isInstance(id)) {
			response.put(ID, Integer.class.cast(id).intValue());
		} else if (Long.class.isInstance(id)) {
			response.put(ID, Long.class.cast(id).longValue());
		} else if (Float.class.isInstance(id)) {
			response.put(ID, Float.class.cast(id).floatValue());
		} else if (Double.class.isInstance(id)) {
			response.put(ID, Double.class.cast(id).doubleValue());
		} else if (BigDecimal.class.isInstance(id)) {
			response.put(ID, BigDecimal.class.cast(id));
		} else {
			response.put(ID, String.class.cast(id));
		}
		response.set(RESULT, result);
		return response;
	}