Learning Library

← Back to Library

JSON Prompting with Nano Banana Pro

Key Points

  • The speaker leverages Nano Banana Pro with JSON prompting, using a custom translator that converts plain‑English descriptions into machine‑readable JSON parameters.
  • JSON prompts are ideal when you need exact, high‑stakes specifications (e.g., precise marketing images or UI designs) because they give the model clear, structured guidance.
  • JSON is not a universal prompting solution; it hinders creativity and is unsuitable for open‑ended “vibe” generation where flexibility is desired.
  • Nano Banana Pro’s strength lies in its compositional control—JSON schemas expose stable handles (camera angle, subjects, components) that allow targeted edits without re‑generating the entire scene.
  • Unlike “vibe” tools such as Midjourney, Nano Banana Pro focuses on correctness and precision, enabling clean swapping of visual grammars and scoped mutations through its JSON schema.

Full Transcript

# JSON Prompting with Nano Banana Pro **Source:** [https://www.youtube.com/watch?v=4u48pDYxfHc](https://www.youtube.com/watch?v=4u48pDYxfHc) **Duration:** 00:09:48 ## Summary - The speaker leverages Nano Banana Pro with JSON prompting, using a custom translator that converts plain‑English descriptions into machine‑readable JSON parameters. - JSON prompts are ideal when you need exact, high‑stakes specifications (e.g., precise marketing images or UI designs) because they give the model clear, structured guidance. - JSON is not a universal prompting solution; it hinders creativity and is unsuitable for open‑ended “vibe” generation where flexibility is desired. - Nano Banana Pro’s strength lies in its compositional control—JSON schemas expose stable handles (camera angle, subjects, components) that allow targeted edits without re‑generating the entire scene. - Unlike “vibe” tools such as Midjourney, Nano Banana Pro focuses on correctness and precision, enabling clean swapping of visual grammars and scoped mutations through its JSON schema. ## Sections - [00:00:00](https://www.youtube.com/watch?v=4u48pDYxfHc&t=0s) **JSON Prompting for Precise Model Control** - Nate describes his custom workflow that translates plain‑English requests into JSON for Nano Banana Pro, highlighting its effectiveness for detailed, high‑stakes tasks while noting it isn’t a universal prompting solution. - [00:03:07](https://www.youtube.com/watch?v=4u48pDYxfHc&t=187s) **JSON Schemas Enable Reproducible Multi‑Domain Generation** - The speaker explains how defining core entities with JSON schemas lets Nano Banana Pro reliably create marketing images, diagrams, and UI components, supporting exact replication, version‑controlled diffs, and integration into serious product pipelines. - [00:06:56](https://www.youtube.com/watch?v=4u48pDYxfHc&t=416s) **From Prompt to Full UI JSON** - The speaker demonstrates how a brief instruction to an AI model generates a complete, detailed JSON schema for a creative alien user interface. ## Full Transcript
0:00I want to let you in on a secret. I use 0:02Nano Banana Pro with JSON prompting and 0:04I've had great results. And you might 0:06wonder, well Nate, what is JSON? JSON is 0:09just computer language that defines 0:11parameters. All I'm doing is giving the 0:13model machine readable parameters. And I 0:15wrote a prompt, so you don't have to 0:17know JSON to write JSON for Nano Banana. 0:20You can describe in plain English what 0:22you want, and the translator I wrote 0:24will render it right back into JSON, 0:26which will give Nano Banana a lot of 0:28structure. But why, right? You're like, 0:29"Well, Nate, is this a universal prompt 0:31act?" The answer is no. It's not a 0:33universal prompt tack. And the reason 0:34why is that prompting specification only 0:37works when you are sure about what you 0:40want. In so many cases with models, what 0:42we want is actually to leave the model 0:45room to be creative. JSON is actively 0:48bad in that situation. It's also 0:50objectively not true that JSON is the 0:53only correct way to prop models. I have 0:55seen some Twitter hypsters claiming 0:56that. That's just not the case. models 0:58are trained on lots and lots of 1:01languages. They prompt well lots of 1:02different ways. What is useful about 1:05JSON is being clear about what you want 1:08for a high stakes proposition. So if you 1:11need a marketing image that has a 1:13particular look for the can of beverage 1:15and you have to have the model wearing a 1:17particular thing and you have to have 1:19the lighting in a particular way, that's 1:21a JSON prompt. I know it sounds funny, 1:23but that's a JSON. If you have a UI and 1:25you want to define it very specifically 1:27and get the colors exactly right, it's a 1:29JSON prompt. That is why Nano Banana Pro 1:32is so interesting with JSON and we're 1:33not talking about it enough because Nano 1:35Banana Pro is a renderer. It is not a 1:38vibes machine. Midjourney is a vibes 1:40machine. You can say I want a neon 1:42cyberpunk schema and and Midjourney will 1:44just vibe that. Nano Banana Pro thinks 1:46about what it's doing and is very 1:48precise. It lives and dies on 1:51correctness. JSON gives it correctness. 1:53It gives it the clarity. One of the 1:55things that makes Nano Banana most 1:57powerful is its compositional control. 1:59You can pivot a camera around the same 2:02scene. You can use different themes, 2:04different layouts, different notations. 2:06JSON makes all of that explicit so that 2:09there are actual human readable 2:11properties that you can vary to control 2:14the camera around the scene. This gives 2:16gives each important thing in the image 2:18a stable handle, right? You can have a 2:21subject that's different from an 2:22environment. You can have a component ID 2:24in a UI that's distinct. And once those 2:27handles exist, which is really all the 2:29JSON schema is, you can say regenerate, 2:31but only touch this one thing. And 2:33that's where Nano Banana shines, right? 2:35I'm not turning the whole scene over to 2:36the model again. I'm just asking for a 2:38very scoped mutation through a computer 2:41schema that Nano Banana will understand. 2:44Nano Banana also spans many many visual 2:46grammars and schemas let you swap those 2:49grammars really cleanly. So Nanobanana 2:51isn't just a photo app. It's not just a 2:53UI app. It spans multiple grammars. It 2:55can be photo, it can be diagram, it can 2:57be UI. Each of those visual grammars has 3:00almost no shared surface level 3:02vocabulary, but they do share a pattern. 3:04Each domain has a set of core entities 3:07and a rigid way that those entities 3:08relate. and JSON schemas help you pin 3:11down the visual grammarss that underly 3:13marketing images that underly diagrams 3:15and UI. In other words, all three of 3:18them respond to the idea that you will 3:20get a structured blob with named fields 3:23and your job is to honor those fields. 3:25Nano Banana can work with that to create 3:27a photo. It can work with that to create 3:28a diagram and it can work with that to 3:30create a UI. What's particularly 3:32valuable is that Nano Banana Pro 3:35effectively can use this ability to 3:37render correctness to work across all of 3:40these domains. And with JSON, you can 3:42work across all these domains, too. I 3:44can create cool marketing images using 3:47JSON. I didn't think I could create cool 3:49marketing images, but apparently I can 3:51because I understand how to manage Nano. 3:53Schemas basically turn Nano Banana Pro 3:56into a tool instead of a toy. Right? If 3:58Nano Banana Pro is going to sit inside a 4:00really serious product stack with design 4:02tools, with code generation, you need 4:05reproducibility. So, give me the exact 4:07same screen again needs to be possible. 4:09You need diff. So, show me what changed 4:11in this prompt between V3 and V4. You 4:14need the ability to actually test 4:17whether a prompt worked in a reliable, 4:19reproducible way. That is what JSON 4:22schemas offers because you can version 4:24control the JSON and say, "We added this 4:26one thing to the JSON. Look what 4:27happened." looked what look what 4:29differed between the last run and this 4:32run. You can enforce rules like you know 4:35don't reduce your tap target for this UI 4:38below 44 pixels and that becomes a part 4:40of your JSON schema. You can actually 4:42encode things like accessibility into a 4:45JSON schema. Nano Banana effectively 4:47becomes something you can reason about 4:49and govern instead of the designer type 4:52to prompt into a nice screen. And I 4:54guess we have something that looks good 4:55but no one knows why. You want to have a 4:57more deterministic set of specifications 5:00and the combination of an image renderer 5:04that values correctness in Nano Banana 5:06Pro and JSON schemas help you get there. 5:09Let me show what the flow practically 5:11looks like. The human will say something 5:13messy. I need a mobile habit tracker app 5:15app with a dark theme and I have three 5:18screens in my mind and a calendar view. 5:20I want it to feel sort of like notion 5:21meeting Dolingo, right? If you have a 5:24prompt like what I'm building here, the 5:26LLM will interpret that. It will apply 5:29your design convention. It will fill out 5:31a JSON schema with the screens, the 5:34components, the tokens, and the layout 5:35primitives, and it will let you review 5:37it. You can then look at it and say, 5:38"Oh, yeah, okay. I think this looks 5:40good." And then you can pass that to 5:42Nano Banana Pro to render. And all of 5:44that detail is there for Nano Banana Pro 5:47to pick up. And if you want changes, you 5:49can just swap out one field at a time. 5:51And one of the beautiful things about 5:53this approach is it helps people not 5:55familiar with JSON learn one of what I 5:58believe is the most valuable skills in 6:00the world which is learning to read 6:02pseudo code. Pseudo code like J this 6:03JSON blob is not real code. It just 6:05looks like code. All it is is a fancy 6:07list that an AI can read and understand 6:09and take seriously. If you can learn to 6:12read it, you become someone who can read 6:15the kinds of structured inputs that AI 6:17values. As you'd expect, that helps your 6:19career these days. But the larger value 6:22from a workflow perspective is that you 6:24as a human can retain your current 6:27preference. Right? If you like to write 6:29paragraphs to describe your work, you 6:31can do that. If you like to write 6:33bullets, you can do that. And then you 6:35can pass it to an LLM with the JSON 6:37converter prompt that I've built and you 6:40can actually get 6:42a complete output where the JSON is 6:46going to be there and then you can read 6:48it. You can modify it. You can just pass 6:50it right to the model. Now you might be 6:52wondering, Nate, how does this all work? 6:54Can you show me an example? You're just 6:56talking to the camera. Yes, I can. Let 6:59me show you how I turned a very, very 7:01short piece of text for me. one that 7:03would be shorter than I would normally 7:05use into a really interesting new 7:07creative interface. Okay, here we are. 7:08This is an actual JSON schema. All I've 7:11given it is please respond with a filled 7:13out JSON template that is for a very 7:15creative UI about aliens. Only respond 7:18with the JSON. That is like eight tokens 7:21on the UI. I would normally give so much 7:24more, but I'm showing you how much power 7:25you have just by appending it. And then 7:27I give the JSON template and it is a 7:29lengthy JSON template, right? Like it 7:30goes and goes and goes and goes. You get 7:32the idea. It responds with a full JSON 7:35template. It's filled it all the way 7:36out. It has imagined what an alien UI 7:38looks like. If I had wanted to be more 7:40specific, it would have filled more 7:42specifics in here. But you can see it's 7:43being extremely clear about what all of 7:45these things are for. Um, and then it 7:48goes all the way down and it says we're 7:50done. And this is what I get the first 7:52time. So, we're going to actually show 7:53you. So, I I went through the first time 7:54and I said, "What do you think about 7:56this?" And you'll notice, by the way, 7:57that I said initiate first contact or 7:59the JSON did. It has it right there. 8:01This is a very faithful rendition and 8:03the model actually graded it as very 8:06faithful and perfectly on brief. I 8:08thought it could be better. I went over 8:09to Google AI Studio and I pasted this in 8:12and I said, "Hey, I would like you to 8:14faithfully follow this JSON and produce 8:16a buildable wireframe of this design." 8:18Because I thought the angle being tilty 8:19was actually not what I wanted and I 8:21wanted to remind it to be professional. 8:23That is me adding a little bit of 8:24instruction over the top, but it's the 8:26exact same JSON. Look at how I get a 8:29very nice, faithful JSON response. It 8:31reads all of this. It's a long response. 8:34It thinks it through and now it's given 8:36me a perfect highfidelity. This is 8:39exactly what it looks like wireframe 8:41that is reproducible. Look how 8:42reproducible this is. This this is 8:44essentially the exact same image. It is 8:47just done tilted forward as a 8:49professional wireframe. I get 8:51reproducibility. I can hit initiate 8:53first contact in both of these very very 8:55easily. My point here is not that you 8:57build alien user interfaces. My point is 8:59that if you use JSON and if you take it 9:02seriously as a tool, you are going to be 9:04able to get farther with professional 9:06use cases for Nano Banana Pro because it 9:08responds to the precision because it 9:11values correctness. So, I'm going to put 9:12a bunch of prompts in the Substack that 9:15get into this JSON piece, the JSON 9:17translator, because I want you to be 9:19able to do this for yourself. I want you 9:21to be able to do this for photos, for 9:23marketing photos, for other kinds of 9:24photos. I want you to be able to do this 9:26for user interfaces and I want you to be 9:27able to do this for diagrams. I think 9:29it's important that we be able to 9:30actually use the tools that we're given 9:32and part of it is discovering how they 9:34work and I think that JSON is an 9:36undersold value ad for Nano Banana Pro. 9:39So hop in. Don't be afraid of the code. 9:41It's not really code. It's pseudo code 9:43and the LLM translator will help you so 9:46much. Cheers.