Examples of textValue()


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

            case NUMBER:
                return fieldNode.numberValue();
            case STRING:
                try {
                    return NumberFormat.getInstance(Locale.getDefault()).parse(
                        fieldNode.textValue());
                } catch (final ParseException e) {
                    throw new JsonDeserializationException(
                            JsonDeserializationExceptionCode.invalidFieldValue, e,
                            fieldName, getTextualBeanType(), e.getMessage());
                }
View Full Code Here

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

        switch (fieldNode.getNodeType()) {
            case BOOLEAN:
                return fieldNode.booleanValue();
            case STRING:
                return Boolean.valueOf(
                        fieldNode.textValue());
            default:
                throw new JsonDeserializationException(
                        JsonDeserializationExceptionCode.invalidFieldValue,
                        fieldName, getTextualBeanType(), "Field cannot be read as a boolean");
        }
View Full Code Here

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

     */
  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

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

  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

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

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

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

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

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

                    checkStringIsASCII(string);
                    strings.add(string);
                }
                return new TXTRecord(name, dclass, ttl, strings);
            } else {
                String strings = fieldNode.textValue();
                checkStringIsASCII(strings);
                return new TXTRecord(name, dclass, ttl, strings);
            }
        } catch (final JsonDeserializationException e) {
            throw e;
View Full Code Here

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

                    checkStringIsASCII(string);
                    strings.add(string);
                }
                return new SPFRecord(name, dclass, ttl, strings);
            } else {
                String strings = fieldNode.textValue();
                checkStringIsASCII(strings);
                return new SPFRecord(name, dclass, ttl, strings);
            }
        } catch (final JsonDeserializationException e) {
            throw e;
View Full Code Here

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

    final JsonNode recordTypeNode = recordNode.get(TYPE_FIELD_NAME);
    if (recordTypeNode == null) {
      throw new MissingFieldJsonDeserializationException(
          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

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

   
    // Title
    JsonNode titleNode = jsonNode.get("title");
    String title = null;
    if (titleNode != null) {
      title = titleNode.textValue();
    }
   
    ChartComponent chartComponent = new ChartComponent(title);
   
   
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.