0

This is the jackson databind artifact i tried to add

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.14.1</version>
    </dependency>

1

Adding Jackson databind artifacts into pom.xml creating error in pom.xml file and Because of this, i am not able to import ObjectMapper..

Below is my code wt i hv written to import data from json file

public List<HashMap<String, String>> getJsonData(String JsonFilePath)
{
    String JsonContent=FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\src\\test\\java\\org\\mobileRecharge\\testData\\Requirements.json"),StandardCharsets.UTF_8);
    ObjectMapper mapper = new ObjectMapper();
    List<HashMap<String, String>> data=mapper.readValue(JsonContent,
            new TypeReference<List<HashMap<String, String>>>(){
        
    });
    return data;

}
surya
  • 1
  • 1

1 Answers1

0

This is the jackson databind artifact i tried to add

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.14.1</version>
    </dependency>
surya
  • 1
  • 1