Examples of JsonDeserializationException


Examples of org.xbill.DNS.utils.json.exception.JsonDeserializationException

  protected SPFRecord createRecord(final Name name, final int dclass,
      final long ttl, final ObjectNode recordNode) {
    try {
            String strings = getNodeStringValue(recordNode, STRINGS_FIELD_NAME);
            if (!CharMatcher.ASCII.matchesAllOf(strings)) {
                throw new JsonDeserializationException(
                        JsonDeserializationExceptionCode.invalidFieldValue,
                        "strings", getTextualBeanType(), "Non-ASCII character found");
            }
            return (SPFRecord) SPFRecord.fromString(name, Type.SPF, dclass,
          ttl, strings, Name.root);
    } catch (final IOException e) {
      throw new JsonDeserializationException(
                    JsonDeserializationExceptionCode.unexpectedMappingError,
          e, getTextualBeanType(), e.getMessage());
    }
  }
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.