J2j
Convert any file.json to the corresponding mapped java files
Install / Use
/learn @cesarferreira/J2jREADME
j2j 
Convert any Files.json to corresponding Classe.java files
<p align="center"> <img src="https://raw.githubusercontent.com/cesarferreira/j2j/master/extras/terminal.gif" width="100%" /> </p>Installation
$ gem install j2j
Usage
$ j2j ~/sample.json -o ~/destination_folder
sample.json:
{
"total": 2,
"people": [
{ "name": "jose" },
{ "name": "maria" }
]
}
Lets look at the ~/destination_folder...
The files Sample.java and Person.java were created
Sample.java:
public class Sample {
private Long total;
private List<Person> people;
public Long getTotal() { return total; }
public void setTotal(Long total) { this.total = total; }
public List<Person> getPerson() { return people; }
public void setPerson(List<Person> people) { this.people = people; }
}
Person.java:
public class Person {
private String name;
public String getName() { return name; }
public void setName(String name) { this.name = name; }
}
... and you're golden :)
Advanced
| Param | Shortcut | Default value | Usage | |:------------:|:---------:| :------------:|:------------| | root_class | -r | Example.java | $ j2j ~/file.json -r Person | | package | -p | com.example | $ j2j ~/file.json -p com.company | | output | -o | out | $ j2j ~/file.json -o src/ |
Complete example:
$ j2j ~/file.json -r Person -p com.compay -o src/
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/cesarferreira/j2j.
Related Skills
node-connect
354.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
