# Json To Java Class — REST API endpoint `json-to-java-class`

Generate Java POJO class source code from a JSON object. Nested objects become separate classes, arrays become List<T>, and you can choose Lombok @Data, getters/setters, or public fields.

- Category: data
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/json-to-java-class/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/json-to-java-class/
- Same tool on the other surface: https://findutils.com/mcp/json-to-java-class/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/json-to-java-class/execute \
  -H "Content-Type: application/json" \
  -d '{
    "json": "{\"id\":1,\"name\":\"John\",\"skills\":[\"Java\"],\"address\":{\"city\":\"NY\"}}"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/json-to-java-class
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `json` | string | yes | JSON object to convert (the root must be an object). |
| `class_name` | string | no | Name of the root class. Default: "Root". Default: `"Root"`. |
| `package_name` | string | no | Java package name, e.g. "com.example". Empty string omits the package line. Default: "com.example". Default: `"com.example"`. |
| `use_lombok` | boolean | no | Add the Lombok @Data annotation and import instead of explicit getters/setters. Default: false. Default: `false`. |
| `generate_getters_setters` | boolean | no | Generate getters and setters (ignored when use_lombok or use_public_fields is true). Default: true. Default: `true`. |
| `use_public_fields` | boolean | no | Declare fields as public instead of private. Default: false. Default: `false`. |

Example arguments (verified):

```json
{
  "json": "{\"id\":1,\"name\":\"John\",\"skills\":[\"Java\"],\"address\":{\"city\":\"NY\"}}"
}
```

Decoded `json` argument (readability only — send it as a string):

```json
{
  "id": 1,
  "name": "John",
  "skills": [
    "Java"
  ],
  "address": {
    "city": "NY"
  }
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:json_to_java_class`. Full MCP reference: https://findutils.com/mcp/json-to-java-class/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
