Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akayibrahim/jsontopojo

Auto creating POJO from JSON.
https://github.com/akayibrahim/jsontopojo

generator json json-schema maven maven-plugin

Last synced: about 4 hours ago
JSON representation

Auto creating POJO from JSON.

Awesome Lists containing this project

README

        

# JSON TO POJO Maven Plugin

#### This Maven Plugin is for creating POJO's automatically from json.

##### Follow steps:

1. Add below build tag to pom.xml of your project

```xml



io.github.akayibrahim
jsontopojo
1.5




{
"employee": {
"name": "sonoo",
"salary": 56000,
"married": true
}
}

io.githup.akayibrahim.testing
EmployeeTesting
true
Pre
Post
false


create






```
2. Run mvn clean install. Once the build is complete, navigate to the project root folder and you should see POJO's file.

Maven Repo Link => https://repo.maven.apache.org/maven2/io/github/akayibrahim/

NOTE : All data in json should not be null or empty. Tool generate TODO comment for null fields, so you can fix it. Please search TODO comment after generate POJO's.

NOTE : For using lombok, you have to add lombok dependency to your pom.xml.
```xml

org.projectlombok
lombok
1.18.10

```
NOTE 2 : For using jackson, you have to add jackson dependency to your pom.xml. it is necessary for "throwForDuplicateObjectName" key.
```xml

com.fasterxml.jackson.core
jackson-annotations
2.10.1

```
Thanks to https://github.com/giordamauro/json-to-pojo/