Create a new class to convert Java object to JSON object. Step 1: Create a Maven project. In the first step, we need to create a maven project using eclipse IDE. ... Step 2: Add Jackson dependency in pom.xml. ... Step 3: Create POJO to convert into JSON. ... Step 4: Create a Java class to convert the Java object into JSON.