JsonToJava
Json to Java source code generator for Jackson (see the wiki https://github.com/astav/JsonToJava/wiki/JsonToJava)
Install / Use
/learn @astav/JsonToJavaREADME
JsonToJava
A JsonToJava source class file generator that deduces the schema based on supplied sample json data and generate the necessary java data structures.
It encourages teams to think in Json first, before writing actual code.
Features
Can generate classes for an arbitrarily complex hierarchy (recursively) Can read your existing Java classes and if it can deserialize into those structures, will do so Will prompt for user input when ambiguous cases exist Tested on java version 1.6
Tips
Specify all values for json fields with non-null values. By doing so, the generator will try to re-use classes it already generated in other structures as long as the class can be parsed back from json into the generated class.
Limitations
Uses Jackson and generates @JsonProperty annotations for json fields Can't discover and create abstract types Can't collate unspecified fields across different structures into the same class when missing information Doesn't support byte, short and char types yet Running the sample
$ ./sample-run.sh
Related Skills
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate 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
352.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
