Package com.fasterxml.jackson.databind.exc

Examples of com.fasterxml.jackson.databind.exc.InvalidFormatException


                if (value.startsWith("[")) {
                    // bracketed IPv6 (with port number)

                    int i = value.lastIndexOf(']');
                    if (i == -1) {
                        throw new InvalidFormatException("Bracketed IPv6 address must contain closing bracket",
                                value, InetSocketAddress.class);
                    }

                    int j = value.indexOf(':', i);
                    int port = j > -1 ? Integer.parseInt(value.substring(j + 1)) : 0;
View Full Code Here


    SimpleDateFormat isoDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
    try {
      return isoDateFormat.parse(isoFormattedDate);
    } catch (ParseException e) {
      throw new InvalidFormatException("Error parsing as date", isoFormattedDate, Date.class);
    }
  }
View Full Code Here

    SimpleDateFormat iso8601Format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    try {
      return iso8601Format.parse(iso8601FormattedDate);
    } catch (ParseException e) {
      throw new InvalidFormatException("Error parsing as date", iso8601FormattedDate, Date.class);
    }
  }
View Full Code Here

    SimpleDateFormat rfc1123DateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", locale);
    try {
      return rfc1123DateFormat.parse(rfc1123FormattedDate);
    } catch (ParseException e) {
      throw new InvalidFormatException("Error parsing as date", rfc1123FormattedDate, Date.class);
    }
  }
View Full Code Here

      return true;
    }
    else if (falseValue.equals(valueAsString)) {
      return false;
    }
    throw new InvalidFormatException(String.format("Unrecognized value; expected %s or %s: %s", trueValue, falseValue, valueAsString), valueAsString, Boolean.class);
  }
View Full Code Here

    String str = jp.getValueAsString();
    try {
      return dateFormat.parse(str);
    } catch (ParseException e) {
      throw new InvalidFormatException("Error parsing as date", str, Date.class);
    }
  }
View Full Code Here

        {
            return localDateFormatter.parseLocalDate(text);
        }
        catch (Throwable throwable)
        {
            throw new InvalidFormatException(throwable.getMessage(), text, String.class);
        }
    }
View Full Code Here

        {
            return dateTimeFormatter.parseDateTime(text);
        }
        catch (Throwable throwable)
        {
            throw new InvalidFormatException(throwable.getMessage(), text, String.class);
        }
    }
View Full Code Here

        {
            return new Period(textValue);
        }
        catch (Throwable throwable)
        {
            throw new InvalidFormatException(throwable.getMessage(), textValue, String.class);
        }
    }
View Full Code Here

        if (value.startsWith("[")) {
            // bracketed IPv6 (with port number)

            int i = value.lastIndexOf(']');
            if (i == -1) {
                throw new InvalidFormatException(
                        "Bracketed IPv6 address must contain closing bracket.",
                        value, InetSocketAddress.class);
            }

            int j = value.indexOf(':', i);
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.exc.InvalidFormatException

Copyright © 2018 www.massapicom. 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.