JSON to Entity Generator - VS Code Extension Extension Demo Features ✨ Convert JSON schemas to fully-typed database entities with one click ⚡ Supports both Sequelize (JavaScript) and TypeORM (TypeScript) 🔧 Automatic type inference from JSON values 🛠️ Adds common fields automatically: Primary key id (BIGINT auto-increment) Timestamps (created_at, updated_at, deleted_at) Status flags (as TINYINT) Created/modified by fields Installation Open VS Code Go to Extensions view (Ctrl+Shift+X) Search for "JSON to Entity Generator" Click Install Usage Select JSON in your editor (example below) Press Shift+Ctrl+P (Windows/Linux) or Shift+Cmd+P (Mac) Choose "Generate Entity from JSON" Select your ORM (Sequelize or TypeORM) Enter your entity name (in PascalCase) Example Input json Copy { "username": "", "age": 25, "score": 98.5, "is_admin": false, "preferences": {} } Generated Outputs Sequelize Output javascript Copy const User = (sequelize, Sequelize) => { const user = sequelize.define('user', { id: { type: Sequelize.BIGINT, primaryKey: true, autoIncrement: true, allowNull: false }, username: { type: Sequelize.STRING, allowNull: true }, age: { type: Sequelize.BIGINT, allowNull: false }, // ... other fields }, { timestamps: true, paranoid: true }); return user; } TypeORM Output typescript Copy @Entity() export class User extends BaseEntity { @PrimaryGeneratedColumn('increment', { type: 'bigint' }) id!: number;
} Type Conversion Table JSON Value Sequelize Type TypeORM Type TypeScript Type "" STRING varchar string 42 BIGINT bigint number 3.14 FLOAT float number true TINYINT tinyint boolean {} JSON json any [] JSON json any[] Keyboard Shortcuts Generate Entity: Shift+Ctrl+P (Windows/Linux) or Shift+Cmd+P (Mac) |