Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.

Added summary to README.md #117

Merged
merged 1 commit into from
Mar 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 89 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,96 @@
Json2Java4Idea
=====

[![CircleCI](https://circleci.com/gh/t28hub/json2java4idea/tree/master.svg?style=shield&circle-token=30a68b03ab00d912be2f9f93b619ca8f4e36f061)](https://circleci.com/gh/t28hub/json2java4idea/tree/master)
[![Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/t28hub/json2java4idea/blob/master/LICENSE)

**Json2Java4Idea** is a plugin which generates Java class from JSON.
This plugin supports the following libraries for serializing and deserializing JSON.
* [Jackson](https://github.com/FasterXML/jackson)
* [GSON](https://github.com/google/gson)
* [Moshi](https://github.com/square/moshi)

## Table of Contents
* Background
* Installation
* Example
* Trouble shooting
* License

## Background

## Installation

## Example
```json
{
"id": 1,
"title": "Introducing Json2Java4Idea",
"private": false,
"comments": [
{
"id": 1,
"body": "Awesome!"
},
{
"id": 2,
"body": "Looks nice to me"
}
]
}
```

```java
public class Post {
private final int id;
private final String title;
private final boolean aPrivate;
private final List<Comments> comments;

public Post(int id, String title, boolean aPrivate, List<Comments> comments) {
this.id = id;
this.title = title;
this.aPrivate = aPrivate;
this.comments = comments;
}

public int getId() {
return id;
}

public String getTitle() {
return title;
}

public boolean isPrivate() {
return aPrivate;
}

public List<Comments> getComments() {
return comments;
}

public static class Comments {
private final int id;
private final String body;

public Comments(int id, String body) {
this.id = id;
this.body = body;
}

public int getId() {
return id;
}

public String getBody() {
return body;
}
}
}
```

## Trouble shooting
Please raise an issue on this repository.

## License
```
Expand Down