<div dir="auto">Here’s an apparent example of creating a JSON schema from a zod schema in TypeScript from google search:</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit">import { z } from "zod";<br style="font-size:inherit"><br style="font-size:inherit">const PersonSchema = z.object({<br style="font-size:inherit"> name: z.string().describe('The name of the person'),<br style="font-size:inherit"> age: z.number().meta({ examples: [30, 45] }), // Use .meta() for complex metadata<br style="font-size:inherit">});<br style="font-size:inherit"><br style="font-size:inherit">const jsonSchema = z.toJSONSchema(PersonSchema);<br style="font-size:inherit"><br style="font-size:inherit">console.log(jsonSchema);<br style="font-size:inherit"></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><br></div><br></div><div dir="auto"><br><div class="gmail_quote gmail_quote_container" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Feb 18, 2026 at 7:48 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If you want to approach JSON schema slightly differently, consider generating a StandardSchema.dev schema (based on Zod in this case). I believe one can generate any number of JSON schema draft schemas from this.<div><br></div><div>None of this has been checked, and may be incomplete. It's merely provided as an example for generating a TypeScript StandardSchema.</div><div><br></div><div>I don't own the copyright to this code, it's merely an example of how one might create a TypeScript schema from (and ultimately a JSON schema), but not according to the design of X3D JSON schema. I'm not sure that's possible. Whether this can create the X3D JSON design with this, with the field prefixes, is questionable. So perhaps a useless endeavor. But using strings for properties might be possible if you're going to generate this code for the real thing.</div><br><div class="gmail_chip gmail_drive_chip" style="width:386px;height:20px;max-height:20px;background-color:#f5f5f5;margin:6px 0;padding:10px;color:#222;font:normal 400 14px/20px 'Google Sans',sans-serif;border:1px solid #ddd"><a href="https://drive.google.com/open?id=1qiC--RmWoXNfna4hwzEiOSNQW2nAGFU8" style="color:rgb(32,33,36);display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;border:none;width:100%" aria-label="uomzod.txt" target="_blank"><img style="vertical-align:text-bottom;border:none;padding-right:10px;height:20px" alt="" src="https://drive-thirdparty.googleusercontent.com/32/type/text/plain"> <span dir="ltr" style="vertical-align:bottom">uomzod.txt</span></a></div></div><div dir="ltr"><br><div>John</div></div>
</blockquote></div></div>