Package com.fasterxml.jackson.databind.node

Examples of com.fasterxml.jackson.databind.node.TreeTraversingParser


  }

  private <T extends Configuration> T build(Class<T> configurationClass, ObjectNode node) throws IOException, ConfigurationException {
    // TODO: property overrides
    // TODO: environment overrides
    T configuration = objectMapper.readValue(new TreeTraversingParser(node), configurationClass);
    if (validator != null) {
      Set<ConstraintViolation<T>> violations = validator.validate(configuration);
      if (!violations.isEmpty()) {
        throw new ConfigurationException("Configuration failed validation: " + violations.toString());
      }
View Full Code Here


    for (Map.Entry<ContextualParameter, Object> contextualArgument : contextualArguments) {
      Class<?> type = contextualArgument.getKey().getType();
      if (JsonNode.class.isAssignableFrom(type)) {
        contextualArgument.setValue(tree);
      } else if (contextualArgument.getKey().getAnnotations().getAnnotation(Jackson.class) != null) {
        Object value = mapper.readValue(new TreeTraversingParser(tree), type);
        contextualArgument.setValue(value);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.node.TreeTraversingParser

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.