Skip to content

Ghost-Sellz/JSONCraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

JSONCraft

Convert JSON into developer models instantly β€” in your browser.

JSONCraft takes raw JSON and generates production-ready data models across multiple languages and frameworks. No installs, no backend, no data ever leaves your machine.

πŸ”— Live demo: js0ncraft.netlify.app


Features

  • 10 output formats β€” TypeScript, Python, GraphQL, SQL, Go, Rust, Java, Kotlin, Zod, Prisma
  • Live conversion mode β€” output updates as you type
  • Drag & drop JSON files directly onto the editor
  • Import from URL β€” fetch JSON from any API endpoint
  • JSON formatter β€” pretty-print with one click
  • JSON validator β€” instant feedback on syntax errors
  • Nested object support β€” deeply nested structures handled automatically
  • Array detection β€” typed arrays and object arrays both supported
  • Smart type inference β€” distinguishes int vs float, String vs Any, etc.
  • Copy & download β€” download uses the correct file extension per language
  • Dark / light theme
  • Zero dependencies β€” pure HTML, CSS, and JavaScript
  • Offline capable β€” clone and open index.html, no server needed

Supported Conversions

Format Output
TypeScript interface definitions
Python @dataclass classes with type hints
GraphQL type schema definitions
SQL CREATE TABLE statements
Go struct with JSON tags
Rust struct with Serde derives
Java Classes with getters and setters
Kotlin data class definitions
Zod Schema with z.infer<> type exports
Prisma model schema blocks

Example

Input:

{
  "user": {
    "id": 1,
    "name": "Alex",
    "email": "alex@mail.com",
    "active": true,
    "score": 9.5
  }
}

TypeScript output:

interface Model {
  user: ModelUser
}

interface ModelUser {
  id: number
  name: string
  email: string
  active: boolean
  score: number
}

Go output:

package main

type Model struct {
  User ModelUser `json:"user"`
}

type ModelUser struct {
  Id     int     `json:"id"`
  Name   string  `json:"name"`
  Email  string  `json:"email"`
  Active bool    `json:"active"`
  Score  float64 `json:"score"`
}

Rust output:

use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct Model {
  pub user: ModelUser,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ModelUser {
  pub id: i64,
  pub name: String,
  pub email: String,
  pub active: bool,
  pub score: f64,
}

Getting Started

Run locally:

git clone https://github.com/Ghost-Sellz/JSONCraft
cd JSONCraft
open index.html

No npm install. No build step. Just open the file.


Project Structure

jsoncraft/
β”œβ”€β”€ index.html   ← UI and layout
β”œβ”€β”€ style.css    ← Theming, dark/light mode, responsive layout
└── script.js    ← All conversion logic and feature handlers

Roadmap

  • TypeScript interface generator
  • Python dataclass generator
  • GraphQL schema generator
  • SQL table generator
  • Go struct generator
  • Rust struct generator
  • Java class generator
  • Kotlin data class generator
  • Zod schema generator
  • Prisma schema generator
  • Drag & drop JSON files
  • Import JSON from API URL
  • Live conversion mode
  • Monaco editor integration
  • CLI version
  • Zod refinements and validations
  • Prisma relations from nested objects
  • Export as multiple files (one per model)

Contributing

Contributions are welcome! See CONTRIBUTING.md for full guidelines.

Quick start:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes and test in the browser
  4. Submit a pull request

Security

JSONCraft runs entirely client-side. Your JSON never leaves the browser. See SECURITY.md for the full policy.


License

MIT


Why JSONCraft?

Developers constantly convert JSON API responses into typed data models. It's repetitive, error-prone, and a waste of time. JSONCraft removes that entirely β€” paste JSON, pick a language, and get clean output in under a second.


If JSONCraft saved you time, consider giving it a ⭐ on GitHub.

About

Convert JSON into TypeScript, Python, GraphQL and SQL models instantly in your browser.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors