Skip to content
JetBrains IDE plugin

Oskuvi JSON from Classes

Writes a sample JSON for a Java class, with a value of the right kind for every field.

Works in
IntelliJ IDEA, free and paid editions, 2025.1 or later
Licence
7-day free trial, then a paid licence
Vendor
Oskuvi, by NPCoding

(01) What it does

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

Made for people like these.

  • Java developers writing tests for REST endpoints.
  • Anyone documenting an API with real-looking examples.

(03)Key features

What's in it, feature by feature.

  • 01

    A value for every field

    Text, whole and decimal numbers, booleans, ISO dates and times, UUIDs, the first constant of an enum, and bytes as base64 text.

  • 02

    Collections and nesting

    Lists, sets, arrays and maps with one element, nested classes, records and inherited fields.

  • 03

    Generics filled in

    A Page<Order> gets a list of orders.

  • 04

    Jackson and Gson names

    @JsonProperty and @SerializedName are honoured; @JsonIgnore, static and transient fields are left out.

  • 05

    Empty values and one line

    Empty values ("", 0, false, []) and the one-line form.

(04)FAQ

Questions, answered.

What does it cost?

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.

Does it follow custom serializers or naming strategies?

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.

What happens with a class that contains itself?

The sample ends: where the class comes round again it says null, and tells you.

(05)Related

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

Need a plugin or an app of your own?

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.