7 karma · joined June 8, 2024
I've been working on my API SaaS called "morph2json" for the past month. It takes any raw text data, such as HTML, YAML, or any other format, and converts it into type-safe JSON, which is then validated against a user-defined schema.
FYI, This conversion will be done using an LLM like GPT-4o or Gemini 1.5 Pro, as they are pretty smart and have large context limits.
I'm creating this tool because I believe it can significantly simplify data management, especially with the increasing use of JSON as the standard input format for many AI applications.
So, if you're interested, please sign up for the waitlist at https://waitlist-m2j.lakshb.dev
However, my implementation (not entirely mine btw) will ensure that whatever the user gets as an output is a valid & type-safe JSON response; otherwise, it will throw an error.
Let me know what you think ^_^
Example Data: John is 25 years old and studies computer science at university. His address is 123 Main St, Anytown 12345
Format that you want will look something like this,
{ "format": { "name": { "type": "string" }, "age": { "type": "number" }, "isStudent": { "type": "boolean" }, "courses": { "type": "array", "items": { "type": "string" } }, "address": { "type": "object", "properties": { "street": { "type": "string" }, "city": { "type": "string" }, "zipcode": { "type": "string" } } } } }
------
Output,
{ "name": "John", "age": 25, "isStudent": true, "courses": ["computer science"], "address": { "properties": { "street": "123 Main St", "city": "Anytown", "zipcode": "12345" } } }
{ "data": "Title: The Effects of Sleep on Memory, Authors: Dr. Jane Doe, Dr. John Smith, Publication Date: 2022-09-15, Journal: Journal of Neuroscience, Abstract: This study explores how sleep influences memory consolidation. Our research indicates that participants who had a full night's sleep performed better on memory tests compared to those who did not. Keywords: sleep, memory, neuroscience, cognition", "format": { "title": { "type": "string" }, "authors": { "type": "array", "items": { "type": "string" } }, "publicationDate": { "type": "string" }, "journal": { "type": "string" }, "abstract": { "type": "string" }, "keywords": { "type": "array", "items": { "type": "string" } } } }
or it can be an HTML, or general text document, or an article pdf whatever
Expected Output will be this,
{ "title": "The Effects of Sleep on Memory", "authors": [ "Dr. Jane Doe", "Dr. John Smith" ], "publicationDate": "2022-09-15", "journal": "Journal of Neuroscience", "abstract": "This study explores how sleep influences memory consolidation. Our research indicates that participants who had a full night's sleep performed better on memory tests compared to those who did not.", "keywords": [ "sleep", "memory", "neuroscience", "cognition" ] }