⚡ craftJson — Generate Dummy JSON Instantly
craftJson
is a lightweight and developer-friendly VSCode extension that helps you instantly generate dummy JSON data based on a simple structure. Whether you're prototyping, testing APIs, or building UIs — this extension saves time and boosts productivity.
✨ Features
- 🔁 Generate multiple entries with
craftJson(count)
- 🔧 Define JSON shape using
structure({...})
- 🧠 Supports nested objects & arrays
- 🆔 Built-in support for types like
id
, string
, number
, boolean
, date
, null
, undefined
- ⚡ Just type
.create()
and your mock JSON will be inserted
🚀 How It Works
Simply define your structure like this:
const data = craftJson(2)
.structure({
id: 'uniqueId',
name: 'string',
age: 'number',
isActive: 'boolean',
joinedAt: 'date',
meta: {
score: 'number',
isNew: 'boolean',
},
tags: ['string'],
profile: [
{
_id: 'id',
status: 'string',
},
],
misc: {
nullable: 'null',
notDefined: 'undefined',
},
})
.create(); // 💡 Type `.create()` to trigger dummy data generation