https://github.com/akayibrahim/jsontopojo
Auto creating POJO from JSON - Project 5
https://github.com/akayibrahim/jsontopojo
generator json json-schema maven maven-plugin
Last synced: 3 months ago
JSON representation
Auto creating POJO from JSON - Project 5
- Host: GitHub
- URL: https://github.com/akayibrahim/jsontopojo
- Owner: akayibrahim
- Created: 2019-12-07T21:24:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-20T21:18:27.000Z (about 3 years ago)
- Last Synced: 2024-12-28T06:41:31.817Z (5 months ago)
- Topics: generator, json, json-schema, maven, maven-plugin
- Language: Java
- Homepage:
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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/