Package org.codehaus.jackson

Examples of org.codehaus.jackson.JsonNode.asText()


            final JsonNode valueNode = node.get(key);
            final Object value;
            if (valueNode == null || valueNode.isNull()) {
                value = null;
            } else if (valueNode.isTextual()) {
                value = valueNode.asText();
            } else if (valueNode.isArray()) {
                value = toList(valueNode);
            } else if (valueNode.isObject()) {
                value = toMap(valueNode);
            } else if (valueNode.isBoolean()) {
View Full Code Here


        while (iter.hasNext()) {
            final Map.Entry<String, JsonNode> entry = iter.next();
            if (entry.getKey().equalsIgnoreCase("type")) {
                final JsonNode n = entry.getValue();
                if (n.isValueNode()) {
                    return n.asText();
                }
            }
        }
        return name;
    }
View Full Code Here

        while (iter.hasNext()) {
            final Map.Entry<String, JsonNode> entry = iter.next();
            if (!entry.getKey().equalsIgnoreCase("type")) {
                final JsonNode n = entry.getValue();
                if (n.isValueNode()) {
                    attrs.put(entry.getKey(), n.asText());
                }
            }
        }
    }
View Full Code Here

        {
            String fieldName = fieldNames.next();
            JsonNode fieldNode = parent.get(fieldName);
            if (fieldName.equals(ID))
            {
                idAsString = fieldNode.asText();
            }
            else if (fieldName.equals(TYPE))
            {
                type = fieldNode.asText();
            }
View Full Code Here

            {
                idAsString = fieldNode.asText();
            }
            else if (fieldName.equals(TYPE))
            {
                type = fieldNode.asText();
            }
            else if (fieldNode.isArray())
            {
                // array containing either broker children or attribute values
                Iterator<JsonNode> elements = fieldNode.getElements();
View Full Code Here

        while (iter.hasNext()) {
            final Map.Entry<String, JsonNode> entry = iter.next();
            if (entry.getKey().equalsIgnoreCase("type")) {
                final JsonNode n = entry.getValue();
                if (n.isValueNode()) {
                    return n.asText();
                }
            }
        }
        return name;
    }
View Full Code Here

        while (iter.hasNext()) {
            final Map.Entry<String, JsonNode> entry = iter.next();
            if (!entry.getKey().equalsIgnoreCase("type")) {
                final JsonNode n = entry.getValue();
                if (n.isValueNode()) {
                    attrs.put(entry.getKey(), n.asText());
                }
            }
        }
    }
View Full Code Here

        }
      } else {
        // field
        if (path.equals(REQUEST_INFO_PATH)) {
           requestInfoProps.put(PropertyHelper.getPropertyId(null, name),
                   child.asText());
        } else if (path.startsWith(REQUEST_INFO_PATH)) {
          requestInfoProps.put(PropertyHelper.getPropertyId(
              path.substring(REQUEST_INFO_PATH.length() + SLASH.length()), name),
                  child.asText());
        } else {
View Full Code Here

           requestInfoProps.put(PropertyHelper.getPropertyId(null, name),
                   child.asText());
        } else if (path.startsWith(REQUEST_INFO_PATH)) {
          requestInfoProps.put(PropertyHelper.getPropertyId(
              path.substring(REQUEST_INFO_PATH.length() + SLASH.length()), name),
                  child.asText());
        } else {
          propertySet.getProperties().put(PropertyHelper.getPropertyId(
              path.equals(BODY_TITLE) ? "" : path, name), child.asText());
        }
      }
View Full Code Here

          requestInfoProps.put(PropertyHelper.getPropertyId(
              path.substring(REQUEST_INFO_PATH.length() + SLASH.length()), name),
                  child.asText());
        } else {
          propertySet.getProperties().put(PropertyHelper.getPropertyId(
              path.equals(BODY_TITLE) ? "" : path, name), child.asText());
        }
      }
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.