JetBrains IDE plugin
Oskuvi Classes from JSON
Writes the Java classes that fit a JSON sample: paste the JSON, see the classes, press Create.
Writes a sample JSON for a Java class, with a value of the right kind for every field.
Oskuvi JSON from Classes writes a sample JSON for a Java class: a value for every field, by its type. For a request body in a test, an example in the documentation, or a first message to try an endpoint with.
Right-click a class in the editor or the Project view and choose JSON Sample of This Class…. The JSON appears with a Copy button. Lists, maps and nested classes are written out, type parameters are filled in from where the class is used, and the names Jackson and Gson would use are honoured.
The plugin only reads your code, on your machine. It doesn't run your code and doesn't need Jackson or Gson in the project.
(02)Who it's for
(03)Key features
Text, whole and decimal numbers, booleans, ISO dates and times, UUIDs, the first constant of an enum, and bytes as base64 text.
Lists, sets, arrays and maps with one element, nested classes, records and inherited fields.
A Page<Order> gets a list of orders.
@JsonProperty and @SerializedName are honoured; @JsonIgnore, static and transient fields are left out.
Empty values ("", 0, false, []) and the one-line form.
(04)FAQ
Nothing for the first 7 days: that's the free trial. After that it needs a licence. The price is on the plugin's page on JetBrains Marketplace.
Not in this version. It reads the annotations named above and the field types; naming strategies set elsewhere, custom serializers and getters without a field aren't followed.
The sample ends: where the class comes round again it says null, and tells you.
JetBrains IDE plugin
Writes the Java classes that fit a JSON sample: paste the JSON, see the classes, press Create.
JetBrains IDE plugin
Draws a class diagram of the Java or Kotlin code you select and gives it to you as Mermaid or PlantUML text.
JetBrains IDE plugin
Measures the Java code you select and shows where it has grown hard to follow: per method, per class and per package.
Java is a registered trademark of Oracle and/or its affiliates. Jackson and Gson are the names of their projects; this plugin is not affiliated with any of them. JetBrains, IntelliJ IDEA and PyCharm are trademarks of JetBrains s.r.o.
Next step
The team that makes these products also builds web and mobile apps, plugins and integrations for clients. Tell us what you need, and we'll come back with practical next steps and an honest estimate.