0

It's my first time working with JSON using Netbeans IDE.

Problem:

I have the maven project, with next dependencies, this is my pom file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>PeopleDataJson</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <dependencies>
       
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.6.3</version>
        </dependency>
    </dependencies>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
</project>

I wanted to add some Jackson imports, but IDE says: Package org.codehaus.jackson does not exist.

Tried to Resolve Project Problems and had next things as a result:

Can't post images, so I put it to google drive.

https://drive.google.com/file/d/1fCz-tLXnvKY9OLGfWJI-ulM17WoUirDF/view?usp=sharing

Can you help me to fix this, please?

Emma
  • 27,428
  • 11
  • 44
  • 69

1 Answers1

3

you should add the following dependency:

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.13</version>
    </dependency>
Hamed
  • 2,084
  • 6
  • 22
  • 42