Recently, I came across a JSON-format prompt for generating 3D icons on x.com, which piqued my interest. Previously, most prompts I encountered were natural language descriptions or simple tags distinguishing system and user input. This was my first time seeing such a structured JSON Prompting approach. After trying it out, I found the results to be truly impressive.
Below are icons I generated using this prompt: Qwen, VS Code, and Obsidian. You can see that all three icons maintain a consistent style while clearly expressing their respective brand identities. The only notable difference is the background tone—Qwen’s background is slightly darker than the other two.

Compared to traditional natural language prompts, this “structured” approach is clearer, more stable, and more powerful—especially suitable for image generation tasks that require fine control. In this article, I’ll use the example of generating a Jelly-style 3D icon to break down the writing and best practices of JSON Prompts.
What is JSON Prompting?
As the name suggests, JSON Prompting means writing prompts in JSON format, conveying task objectives, rendering details, output requirements, etc., in a structured way to the model. It’s not a vague one-liner, but an “input manual”—just like how developers write configuration files.
Here’s the JSON Prompt I used to generate the icons:
{
"style": "Jelly 3D Icon",
"object": "User-uploaded logo or emoji (Qwen)",
"base": {
"shape": "Rounded square",
"material": "Soft translucent jelly-like material",
"color": "A strong contrasting color to icon (e.g. purple, green, blue)",
"lighting": "Inner glow and soft ambient shadows that gently fade outward"
},
"icon": {
"material": "Jelly/glassy translucent look, softly glowing from within",
"color": "Brighter tone or brand color, always with a jelly-glass texture",
"depth": "3D extruded with rounded edges and subtle bottom shadow",
"placement": "Centered with even padding inside base"
},
"render": {
"camera": "Front orthographic view with centered framing",
"lighting": "Studio-quality lighting with soft top-left highlight and directional drop shadow underneath icon",
"shadow": {
"style": "Soft diffused base shadow with slight blur",
"position": "Directly under icon, slightly offset down",
"opacity": 0.15,
"spread": "Medium, matching other icons in set"
},
"background": "Soft warm grey or pastel cream for consistency",
"dimensions": "1:1 square ratio, minimum 1024x1024",
"file_format": "PNG"
},
"style_notes": "Ensure consistent lighting and shadow softness across the set. Shadows should appear slightly beneath and behind the icon with soft blur — matching the Spotify, Camera, and Weather icon samples exactly. Avoid flat or harsh shadows. Emphasize clean separation between icon and base through shadow and depth."
}
Why Use JSON Format Instead of Natural Language?
- Clear Structure: Each requirement is an independent field, avoiding omissions and ambiguity.
- Machine-Readable: AI is better at understanding structured data, making parameter targeting more accurate.
- Easy Reuse: Templates, batch generation, and modification are more convenient—ideal for standardized scenarios.
- Efficient Communication: Like a requirements doc, team members can understand at a glance.
- Automation-Friendly: Easy to generate, validate, and analyze with scripts.
Natural language is great for creative tasks; JSON format is better for precise, standardized, and controllable content generation. Use both as needed.
Though this prompt looks complex, it’s actually composed of several semantically clear modules. Let’s break them down one by one.
Field Structure and Writing Tips
After understanding the overall structure and advantages, let’s analyze the function and writing tips for each field in detail. The following breakdown will help you master the core points and practical writing of structured prompts.
1. Top-Level Parameters: Task Style and Target Object
"style": "Jelly 3D Icon",
"object": "User-uploaded logo or emoji (Qwen)"
- style sets the visual tone and anchors the icon’s style.
- object specifies the core element to be visualized—be as specific as possible, e.g., “logo” or a particular emoji.
Best Practices:
- Use existing visual language keywords from your project (e.g., “jelly”, “glass”, “3D extrusion”).
- Avoid vague object descriptions; be as specific as possible.
2. base Block: Defining the Icon Base
"base": {
"shape": "Rounded square",
"material": "Soft translucent jelly-like material",
"color": "...",
"lighting": "..."
}
- This section sets the style of the icon’s base, including shape, material, color, and lighting.
- Especially useful for maintaining consistency across multiple icons.
Best Practices:
- Use common shapes (rounded square, circle, etc.) for a modern look.
- Use contrasting colors, e.g., “strong contrast to icon”.
3. icon Block: Defining the Icon Body
"icon": {
"material": "...",
"color": "...",
"depth": "...",
"placement": "..."
}
- material and depth together define the icon’s texture and 3D layering.
- placement ensures centering and balanced padding for visual harmony.
Best Practices:
- Use depth: “3D extruded” to clarify modeling.
- Keep material expressions consistent (e.g., all jelly-glass) for a cohesive look.
4. render Block: Rendering and Output Format
"render": {
"camera": "...",
"lighting": "...",
"shadow": {...},
"background": "...",
"dimensions": "...",
"file_format": "PNG"
}
- Controls “camera angle” and “studio lighting” for image generation.
- The shadow subfield provides highly controllable shadow settings.
- dimensions and file_format ensure stable output for web or print.
Best Practices:
- Always specify resolution (e.g., 1024x1024) to avoid blurry images.
- Use background: pastel cream for a unified background style.
5. style_notes: Designer-Level Aesthetic Guidance
"style_notes": "Ensure consistent lighting and shadow softness across the set..."
This section helps the AI understand aesthetic intent. Though supplementary, it can make a big difference with high-quality models.
Best Practices:
- Imagine you’re giving style guidelines to a human renderer.
- Use relative concepts (e.g., “avoid harsh shadows”, “match Spotify-style icons”).
Writing Summary: A General Template for JSON Prompts
You can apply this pattern to other content generation tasks, such as:
{
"task": "generate image",
"style": "3D glass icon",
"object": "light bulb emoji",
"base": { ... },
"icon": { ... },
"render": { ... },
"style_notes": "..."
}
Whether generating icons, product images, or web illustrations, as long as you express requirements structurally, AI outputs will be more precise.
Core Advantages of JSON Prompts
JSON prompts are a structured way to communicate requirements to AI. Unlike vague instructions, they clearly list task requirements in a specific format. For example, if you want to write a WeChat article about an app, a typical prompt might be “Write a WeChat article about [app name]”, while a JSON prompt would look like {"task": "Write WeChat article", "topic": "[App Name]", "length": "Short, under 1000 words", "tone": "Professional but friendly"}
—specifying task, topic, length, and tone.
The main advantages of JSON prompts are:
- Clarity: Avoids AI guessing at vague words like “interesting”—JSON prompts define requirements precisely.
- AI-Friendly: JSON format is similar to the code AI is trained on and fits its data processing habits.
- Time-Saving: JSON prompts save time by reducing the need for repeated prompt tweaking.
How to Use JSON Prompts
When using JSON prompts, follow these principles:
- Use Clear Labels: Explicitly state the “task” and describe it specifically, e.g., “Write WeChat article”.
- Add Details: Include details like audience and style.
- Break Down Complex Tasks: For complex tasks, use nested fields to break them down.
For example, to get book recommendations for entrepreneurs: {"task": "recommend books", "topic": "better thinking", "audience": "entrepreneurs", "format": "5 books, each with a short summary"}
.
JSON Prompts vs. Conventional Prompts
Take writing a WeChat article about entrepreneurs staying focused as an example. A conventional prompt like “Write a WeChat article about entrepreneurs’ focus” yields generic content. A JSON prompt, specifying platform, topic, structure, and tone, results in an article that starts with an engaging question, includes practical tips and real cases, and ends with a call for comments—showcasing the advantages of JSON prompts for platform-specific content.
When to Use JSON Prompts
JSON prompts are ideal for scenarios where you need precise control over AI output, allowing you to clearly communicate requirements and get results that meet expectations. However, for creative and open-ended content—like imaginative children’s stories or sci-fi ideas—conventional free-form prompts are better for sparking creativity.
Conclusion: Structured Prompts as an Engineering Approach to Creation
Using JSON Prompts made me realize a trend: we need not just “AI that understands you”, but “AI that follows clear instructions”.
Compared to the uncertainty of natural language “requests”, JSON Prompts are more like a specification, a parameter sheet, or a requirements document. This approach is especially suitable for developers, designers, and product managers who need to build stable creative pipelines.
If you’re working on multi-image generation, multi-scenario copywriting, or templated content creation, give JSON Prompting a try. You’ll find it not only makes AI outputs stronger, but also clarifies your own thinking.