Package com.addthis.codec.config

Examples of com.addthis.codec.config.ConfigTraversingParser.readValueAs()


    }

    public <T> T decodeObject(@Nonnull Class<T> type, ConfigValue configValue)
            throws JsonProcessingException, IOException {
        ConfigTraversingParser configParser = new ConfigTraversingParser(configValue, objectMapper);
        return validate(configParser.readValueAs(type));
    }

    public <T> T decodeObject(@Nonnull Class<T> type, JsonNode jsonNode) throws JsonProcessingException {
        return validate(objectMapper.treeToValue(jsonNode, type));
    }
View Full Code Here


    }

    public <T> T decodeObject(@Nonnull Class<T> type, ConfigValue configValue)
            throws JsonProcessingException, IOException {
        ConfigTraversingParser configParser = new ConfigTraversingParser(configValue, objectMapper);
        return validate(configParser.readValueAs(type));
    }

    public <T> T decodeObject(@Nonnull Class<T> type, JsonNode jsonNode) throws JsonProcessingException {
        return validate(objectMapper.treeToValue(jsonNode, type));
    }
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.