Examples of readValueAsTree()


Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

                    openStreams(jp.getText());
                }
            } else if (fieldName.equals("fieldTypes")) {
                if (current == JsonToken.START_ARRAY) {
                    while (jp.nextToken() != JsonToken.END_ARRAY) {
                        importFieldType(jp.readValueAsTree());
                    }
                } else {
                    System.out.println("Error: fieldTypes property should be an array. Skipping.");
                    jp.skipChildren();
                }
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

                    jp.skipChildren();
                }
            } else if (fieldName.equals("recordTypes")) {
                if (current == JsonToken.START_ARRAY) {
                    while (jp.nextToken() != JsonToken.END_ARRAY) {
                        importRecordType(jp.readValueAsTree());
                    }
                } else {
                    System.out.println("Error: recordTypes property should be an array. Skipping.");
                    jp.skipChildren();
                }
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

                    jp.skipChildren();
                }
            } else if (fieldName.equals("recordSpaces")) {
                if (current == JsonToken.START_ARRAY) {
                    while (jp.nextToken() != JsonToken.END_ARRAY) {
                        recordSpacesConfig.add(jp.readValueAsTree());
                    }
                    for (int i = 0; i < workers; i++) {
                        workersRecordSpaces.add(new RecordSpaces(recordSpacesConfig));
                    }
                } else {
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

                    jp.skipChildren();
                }
            } else if (fieldName.equals("scenario")) {
                if (current == JsonToken.START_ARRAY) {
                    while (jp.nextToken() != JsonToken.END_ARRAY) {
                        JsonNode actionNode = jp.readValueAsTree();
                        prepareAction(actionNode);
                    }
                } else {
                    System.out.println("Error: recordSpaces property should be an array. Skipping.");
                    jp.skipChildren();
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

                    System.out.println("Error: recordSpaces property should be an array. Skipping.");
                    jp.skipChildren();
                }
            } else if (fieldName.equals("stopConditions")) {
                if (current == JsonToken.START_OBJECT) {
                    readStopConditions((ObjectNode) jp.readValueAsTree());
                } else {
                    System.out.println("Error: stopConditions property should be an object. Skipping.");
                    jp.skipChildren();
                }
            }
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

        }
    }

    public static JsonNode deserialize(InputStream inputStream) throws IOException {
        JsonParser jp = JSON_FACTORY.createJsonParser(inputStream);
        return jp.readValueAsTree();
    }

    public static JsonNode deserializeNonStd(InputStream inputStream) throws IOException {
        JsonParser jp = JSON_FACTORY_NON_STD.createJsonParser(inputStream);
        return jp.readValueAsTree();
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

        return jp.readValueAsTree();
    }

    public static JsonNode deserializeNonStd(InputStream inputStream) throws IOException {
        JsonParser jp = JSON_FACTORY_NON_STD.createJsonParser(inputStream);
        return jp.readValueAsTree();
    }

    public static JsonNode deserialize(byte[] data) throws IOException {
        JsonParser jp = JSON_FACTORY.createJsonParser(data);
        return jp.readValueAsTree();
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

        return jp.readValueAsTree();
    }

    public static JsonNode deserialize(byte[] data) throws IOException {
        JsonParser jp = JSON_FACTORY.createJsonParser(data);
        return jp.readValueAsTree();
    }

    public static JsonNode deserialize(String data) throws IOException {
        JsonParser jp = JSON_FACTORY.createJsonParser(data);
        return jp.readValueAsTree();
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

        return jp.readValueAsTree();
    }

    public static JsonNode deserialize(String data) throws IOException {
        JsonParser jp = JSON_FACTORY.createJsonParser(data);
        return jp.readValueAsTree();
    }

    /**
     * Variant of deserialize that converts the IOException to a RuntimeException.
     *
 
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAsTree()

     * @param what a label for what is being deserialized, used in the error message
     */
    public static JsonNode deserializeSoft(byte[] data, String what) {
        try {
            JsonParser jp = JSON_FACTORY.createJsonParser(data);
            return jp.readValueAsTree();
        } catch (IOException e) {
            throw new RuntimeException("Error deserializing " + what + " from JSON.", e);
        }
    }

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.