Package com.facebook.presto.jdbc.internal.jackson.databind

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonNode.path()


    @Override
    public ReadablePeriod deserialize(JsonParser jsonParser, DeserializationContext ctxt)
        throws IOException
    {
        JsonNode treeNode = jsonParser.readValueAsTree();
        String periodType = treeNode.path("fieldType").path("name").asText();
        String periodName = treeNode.path("periodType").path("name").asText();
        // any "weird" numbers we should worry about?
        int periodValue = treeNode.path(periodType).asInt();
        if (periodName.equals( "Seconds" )) {
            return Seconds.seconds( periodValue );
View Full Code Here


    public ReadablePeriod deserialize(JsonParser jsonParser, DeserializationContext ctxt)
        throws IOException
    {
        JsonNode treeNode = jsonParser.readValueAsTree();
        String periodType = treeNode.path("fieldType").path("name").asText();
        String periodName = treeNode.path("periodType").path("name").asText();
        // any "weird" numbers we should worry about?
        int periodValue = treeNode.path(periodType).asInt();
        if (periodName.equals( "Seconds" )) {
            return Seconds.seconds( periodValue );
        }
View Full Code Here

    {
        JsonNode treeNode = jsonParser.readValueAsTree();
        String periodType = treeNode.path("fieldType").path("name").asText();
        String periodName = treeNode.path("periodType").path("name").asText();
        // any "weird" numbers we should worry about?
        int periodValue = treeNode.path(periodType).asInt();
        if (periodName.equals( "Seconds" )) {
            return Seconds.seconds( periodValue );
        }
        if (periodName.equals( "Minutes" )) {
            return Minutes.minutes( periodValue );
View Full Code Here

        throws IOException
    {
        JsonToken t = jp.getCurrentToken();
        if (t == JsonToken.START_OBJECT) { // old style
            JsonNode root = jp.readValueAsTree();
            String host = root.path("hostText").asText();
            JsonNode n = root.get("port");
            if (n == null) {
                return HostAndPort.fromString(host);
            }
            return HostAndPort.fromParts(host, n.asInt());
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.