Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.JsonNode.textValue()


        final JsonNode node = schema.get(keyword);

        final EnumSet<NodeType> typeSet = EnumSet.noneOf(NodeType.class);

        if (node.isTextual()) // Single type
            typeSet.add(NodeType.fromName(node.textValue()));
        else // More than one type
            for (final JsonNode element: node)
                typeSet.add(NodeType.fromName(element.textValue()));

        if (typeSet.contains(NodeType.NUMBER))
View Full Code Here


        final JsonNode node = context.getSchema().getNode().get("format");

        if (node == null)
            return input;

        final String fmt = node.textValue();
        final FormatAttribute attr = attributes.get(fmt);

        if (attr == null) {
            report.warn(input.newMessage().put("domain", "validation")
                .put("keyword", "format")
View Full Code Here

        final JsonNode node = schema.get(keyword);

        final EnumSet<NodeType> set = EnumSet.noneOf(NodeType.class);

        if (node.isTextual()) // Single type
            putType(set, node.textValue());
        else { // More than one type, and possibly schemas
            final int size = node.size();
            JsonNode element;
            for (int index = 0; index < size; index++) {
                element = node.get(index);
View Full Code Here

            final int size = node.size();
            JsonNode element;
            for (int index = 0; index < size; index++) {
                element = node.get(index);
                if (element.isTextual())
                    putType(set, element.textValue());
                else
                    schemas.add(index);
            }
        }
View Full Code Here

     */
  public InetAddress getNodeAddressValue(final ObjectNode recordNode,
      final String fieldName) {
    final JsonNode addressNode = findFieldNode(recordNode, fieldName);
    try {
      if (addressNode.textValue() != null) {
        return getAddressFromString(addressNode.textValue());
      } else {
        return null;
      }
    } catch (final Throwable e) {
View Full Code Here

  public InetAddress getNodeAddressValue(final ObjectNode recordNode,
      final String fieldName) {
    final JsonNode addressNode = findFieldNode(recordNode, fieldName);
    try {
      if (addressNode.textValue() != null) {
        return getAddressFromString(addressNode.textValue());
      } else {
        return null;
      }
    } catch (final Throwable e) {
      throw new JsonDeserializationException(
View Full Code Here

    if (recordTypeNode == null) {
      throw new JsonDeserializationException(
                    JsonDeserializationExceptionCode.missingField,
          TYPE_FIELD_NAME, "resource record");
    }
    final String recordType = recordTypeNode.textValue();
    final Class<? extends Record> recordClass = recordClassesRegistry
        .get(recordType);
    if (recordClass == null) {
      throw new JsonDeserializationException(
                    JsonDeserializationExceptionCode.unknownResourceRecordType,
View Full Code Here

  public InetAddress getNodeAddressValue(final ObjectNode recordNode,
      final String fieldName) {
    final JsonNode addressNode = findFieldNode(recordNode, fieldName);
    try {
      if (addressNode.textValue() != null) {
        return getAddressFromString(addressNode.textValue());
      } else {
        return null;
      }
    } catch (final Throwable e) {
View Full Code Here

  public InetAddress getNodeAddressValue(final ObjectNode recordNode,
      final String fieldName) {
    final JsonNode addressNode = findFieldNode(recordNode, fieldName);
    try {
      if (addressNode.textValue() != null) {
        return getAddressFromString(addressNode.textValue());
      } else {
        return null;
      }
    } catch (final Throwable e) {
      throw new DNSAPIClientJsonMappingException(
View Full Code Here

        });
    }

    private static String getAttributeAsText(JsonNode json, String name) {
        JsonNode jsonNode = json.get(name);
        return jsonNode == null ? null : jsonNode.textValue();
    }

    private static AssetsBuilder delegate = new AssetsBuilder();

    public static Action<AnyContent> asset(String path, String file) {
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.