Package org.codehaus.jackson.map

Examples of org.codehaus.jackson.map.ObjectMapper.valueToTree()


        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("system-props.json");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition, connection, null);
View Full Code Here


        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("system-props.json");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition, connection, null);
View Full Code Here

        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("system-props.json");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition, connection, null);
View Full Code Here

        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("expressionTest.json");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition, connection, null);
View Full Code Here

        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("collapsedMapTest.json");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition, connection, null);
View Full Code Here

        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("collapsedMapTest.json");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition, connection, null);
View Full Code Here

    public void testListOfPlainMaps() throws Exception {
        String resultString = loadJsonFromFile("listofplainmaps.json");
        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        FakeConnection connection = new FakeConnection();
        connection.setContent(json);

        ConfigurationDefinition definition = loadDescriptor("listOfPlainMaps");
View Full Code Here

    @SuppressWarnings("unchecked")
    public void testGroupedPropertiesWithIdenticalNames() throws Exception {
        String resultString = loadJsonFromFile("groupedproperties.json");
        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        FakeConnection connection = new FakeConnection();
        connection.setContent(json);

        ConfigurationDefinition definition = loadDescriptor("groupedproperties");
View Full Code Here

        ObjectMapper mapper = new ObjectMapper();
        //deserialize string to ComplexResult.
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);

        //create json tree from result.
        JsonNode json = mapper.valueToTree(result);

        //add the created content to the fake connection so that we set the results to be returned.
        connection.setContent(json);

        //We pass in null here so that the fake connection will return the value passed into setContent().
View Full Code Here

            relativeToProperty);
        definition.put(fileMapDef);

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
        Configuration config = delegate.loadResourceConfiguration();
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.