GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update README.md · jonfhancock/JsonToJava@3ba691d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

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 numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ when run from the commandline, it takes three arguments:
1010
<li>a url to a json file</li>
1111
<li>a package name for the classes it will generate</li>
1212
<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>
1315
</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+
1518

1619
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.
1720

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).
1922
Each class will have a default empty constructor.
2023
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)
2326
If a member called "mId" or "mUniqueId" is found, then equals and hashcode will be overridden so comparisons are made on the id.
2427

2528
<h3>What I want this tool to do in the future in no particular order</h3>

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.