Thursday, 5 October 2023

Show HN: A tool to Convert JSON schemas into TypeScript Deno classes https://bit.ly/46FdM0E

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://bit.ly/45in4i7 October 6, 2023 at 01:13AM

No comments:

Post a Comment