Package com.fasterxml.jackson.core

Examples of com.fasterxml.jackson.core.JsonParser.readValueAsTree()


    private JsonNode getResponseTree( Response response )
        throws IOException
    {
        JsonParser jsonParser = jsonFactory.createJsonParser( (InputStream) response.getEntity() );
        return (JsonNode) jsonParser.readValueAsTree();
    }

    private void reportErrors( Response resp )
        throws IOException, MojoExecutionException
    {
View Full Code Here


    private JsonNode getResponseTree( Response response )
        throws IOException
    {
        JsonParser jsonParser = jsonFactory.createJsonParser( (InputStream) response.getEntity() );
        return (JsonNode) jsonParser.readValueAsTree();
    }

    private void reportErrors( Response resp )
        throws IOException, MojoExecutionException
    {
View Full Code Here

                    if (current != JsonToken.START_OBJECT) {
                        logger.warn("read_config: Error:  START_OBJECT not found after metric_groups START_ARRAY : quiting.");
                        return;
                    }
                    current = jp.nextToken();
                    JsonNode node1 = jp.readValueAsTree();
                    String node1string = write_tostring(node1);
                    metricgroupMap.put(node1.get("name").asText(),node1string);
                    current = jp.nextToken();
                }
View Full Code Here

                        if (current != JsonToken.START_OBJECT) {
                            logger.warn("read_config: Error:  START_OBJECT not found after dashboards START_ARRAY : quiting.");
                            return;
                        }
                        current = jp.nextToken();
                        JsonNode node = jp.readValueAsTree();
                        String nodestring = write_tostring(node);
                        dashMap.put(node.get("name").asText(),nodestring);
                        current = jp.nextToken();

                    }
View Full Code Here

            if (current != JsonToken.START_OBJECT) {
                logger.warn("groupFind: Error: START_OBJECT expected, not found : quiting.");
                return(Result);
            }
            current = jp.nextToken();
            JsonNode node = jp.readValueAsTree();
            String tmpStr = node.get("name").asText().toString();
             if(findName.equals(node.get("name").asText().toString())) {
                if(ExpectInt != 0) {
                    foundit = node.get("id").asInt();
                    Result = String.valueOf(foundit);
View Full Code Here

    /**
     * Creates a vertex from GraphSON using settings supplied in the constructor.
     */
    public Vertex vertexFromJson(final String json) throws IOException {
        final JsonParser jp = jsonFactory.createParser(json);
        final JsonNode node = jp.readValueAsTree();
        return this.vertexFromJson(node);
    }

    /**
     * Creates a vertex from GraphSON using settings supplied in the constructor.
View Full Code Here

    /**
     * Creates a vertex from GraphSON using settings supplied in the constructor.
     */
    public Vertex vertexFromJson(final InputStream json) throws IOException {
        final JsonParser jp = jsonFactory.createParser(json);
        final JsonNode node = jp.readValueAsTree();
        return this.vertexFromJson(node);
    }

    /**
     * Creates a vertex from GraphSON using settings supplied in the constructor.
View Full Code Here

    /**
     * Creates an edge from GraphSON using settings supplied in the constructor.
     */
    public Edge edgeFromJson(final String json, final Vertex out, final Vertex in) throws IOException {
        final JsonParser jp = jsonFactory.createParser(json);
        final JsonNode node = jp.readValueAsTree();
        return this.edgeFromJson(node, out, in);
    }

    /**
     * Creates an edge from GraphSON using settings supplied in the constructor.
View Full Code Here

    /**
     * Creates an edge from GraphSON using settings supplied in the constructor.
     */
    public Edge edgeFromJson(final InputStream json, final Vertex out, final Vertex in) throws IOException {
        final JsonParser jp = jsonFactory.createParser(json);
        final JsonNode node = jp.readValueAsTree();
        return this.edgeFromJson(node, out, in);
    }

    /**
     * Creates an edge from GraphSON using settings supplied in the constructor.
View Full Code Here

                final GraphSONMode mode = GraphSONMode.valueOf(jp.getText());
                graphson = new GraphSONUtility(mode, elementFactory, vertexPropertyKeys, edgePropertyKeys);
            } else if (fieldname.equals(GraphSONTokens.VERTICES)) {
                jp.nextToken();
                while (jp.nextToken() != JsonToken.END_ARRAY) {
                    final JsonNode node = jp.readValueAsTree();
                    graphson.vertexFromJson(node);
                }
            } else if (fieldname.equals(GraphSONTokens.EDGES)) {
                jp.nextToken();
                while (jp.nextToken() != JsonToken.END_ARRAY) {
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.