Show HN: A tool to Convert JSON schemas into TypeScript Deno classes https://ift.tt/dPYcaxT

Show HN: A tool to Convert JSON schemas into TypeScript Deno classes https://ift.tt/dPYcaxT

Show HN: A tool to Convert JSON schemas into TypeScript Deno classes Hello all To preface this is just something I've been making as a learning exercise, so all feedback is appreciated. This is a tool that converts JSON schemas into TypeScript utility classes for use in Deno. Automatic Type Generation: Typescript interfaces for the compressed and uncompressed versions of your data. Compression & Decompression: Compress and decompress your data. Validation: Built-in data validation using Ajv ensures your data adheres to the schema. Reusability: Once generated, the utility classes can be used in other Deno projects. It currently only supports a subset of JSON schema features. I'll eventually hope to expand it to support more features. Reasons behind the project: I have been working with OpenAI LLMs recently and I like to get my data output in structured JSON. I realised it's rather good at taking a schema where properties are compressed within an instruction, and then in return it return data based on the compressed schema. These utility classes provide help with the validation, decompression etc. https://ift.tt/fRDOrzi October 6, 2023 at 05:43AM

0 Comments: