Examples of valueToTree()


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

    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

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

    @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

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

        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

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

            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

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

        ConfigurationDefinition definition = loadDescriptor("socketBinding");

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

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

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

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

        ConfigurationDefinition definition = loadDescriptor("test4");

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

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

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

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

        ConfigurationDefinition definition = loadDescriptor("test5");

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

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

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

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

        ConfigurationDefinition definition = loadDescriptor("test6and7");

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

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

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

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

        ConfigurationDefinition definition = loadDescriptor("test6and7");

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

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

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

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

        ConfigurationDefinition definition = loadDescriptor("test8");

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

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

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