GeezerVison is showing github.com — Update README.md · jonfhancock/JsonToJava@3ba691d
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +7-4Lines changed: 7 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,16 +10,19 @@ when run from the commandline, it takes three arguments: |
10 | 10 | <li>a url to a json file</li> |
11 | 11 | <li>a package name for the classes it will generate</li> |
12 | 12 | <li>the name of the base class to start with.</li> |
| 13 | +<li>optionally, the p option will make your classes parcelable.</li> |
| 14 | +<li>optionally, the g option will give your classes gson annotations for serialization.</li> |
13 | 15 | </ul> |
14 | | -e.g. java -jar JsonToJava http://example.com/folder.json com.example.api.model Folder |
| 16 | +java -jar JsonToJava.jar -url http://example.com/folder.json -package com.example.api.model -class Folder -p -g |
| 17 | + |
15 | 18 |
|
16 | 19 | It will create the folder structure for the package you provide, then it will read the json at the url you provide, and output java classes into the folder locally. |
17 | 20 |
|
18 | | -Each class will implement Parcelable for easy passing of information in Android. |
| 21 | +Each class will implement Parcelable for easy passing of information in Android (optional). |
19 | 22 | Each class will have a default empty constructor. |
20 | 23 | The members of each class will follow Android naming conventions with an "m" prefix and camel case. |
21 | | -Each member will have a corresponding static final String that relates it to it's json counterpart |
22 | | -Each member will have a @SerializedName annotation for very easy Gson parsing. |
| 24 | +Each member will have a corresponding static final String that relates it to it's json counterpart |
| 25 | +Each member will have a @SerializedName annotation for very easy Gson parsing. (optional) |
23 | 26 | If a member called "mId" or "mUniqueId" is found, then equals and hashcode will be overridden so comparisons are made on the id. |
24 | 27 |
|
25 | 28 | <h3>What I want this tool to do in the future in no particular order</h3> |
|