# Oskuvi JSON from Classes

> Oskuvi JSON from Classes writes a sample JSON for a Java class or record in IntelliJ IDEA: a value for every field, nested classes and generics, with Jackson and Gson names.

Source: https://npcoding.ca/products/oskuvi-json-from-classes/
Last updated: 2026-10-22

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

## Product facts

- **Type:** JetBrains IDE plugin
- **Status:** Live on JetBrains Marketplace (https://plugins.jetbrains.com/plugin/35129)
- **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
- **Vendor page:** https://plugins.jetbrains.com/vendor/npcoding

## 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.

## Who it's for

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

## Key features

- **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.
- **Collections and nesting:** Lists, sets, arrays and maps with one element, nested classes, records and inherited fields.
- **Generics filled in:** A Page<Order> gets a list of orders.
- **Jackson and Gson names:** @JsonProperty and @SerializedName are honoured; @JsonIgnore, static and transient fields are left out.
- **Empty values and one line:** Empty values ("", 0, false, []) and the one-line form.

## Frequently asked questions

### 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.

## Related products

- [Oskuvi Classes from JSON](https://npcoding.ca/products/oskuvi-classes-from-json/): Writes the Java classes that fit a JSON sample: paste the JSON, see the classes, press Create.
- [Oskuvi Class Diagrams](https://npcoding.ca/products/oskuvi-class-diagrams/): Draws a class diagram of the Java or Kotlin code you select and gives it to you as Mermaid or PlantUML text.
- [Oskuvi Code Metrics](https://npcoding.ca/products/oskuvi-code-metrics/): Measures the Java code you select and shows where it has grown hard to follow: per method, per class and per package.

## Built by NPCoding

Need an API designed, tested and documented? That's what we do.

- [API Development](https://npcoding.ca/services/api-development/): Secure, well-documented REST and GraphQL APIs that connect your apps, partners and data.

*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.*

---

NPCoding · AI-powered software & app development · Toronto, Canada · support@npcoding.com · https://npcoding.ca/contact/
