{"repo":"aotakeda/ai-json-fixer","free":true,"listed":false,"github":"https://github.com/aotakeda/ai-json-fixer","clone":"git clone https://github.com/aotakeda/ai-json-fixer.git","description":"A simple JSON parser specifically designed to handle malformed JSON output from Large Language Models (LLMs) like GPT, Claude, and others.","language":"TypeScript","stars":27,"topics":["claude","gemini","gpt","json","llm","opus","sonnet","typescript"],"license":"MIT","category":"ai-agents","readme_excerpt":"ai-json-fixer A simple JSON parser specifically designed to handle malformed JSON output from Large Language Models (LLMs) like GPT, Claude, and others. Features Core - Markdown Block Extraction : Extracts JSON from bash npm install ai-json-fixer typescript import { LLMJSONParser } from 'ai-json-fixer'; const parser = new LLMJSONParser(); // Parse JSON from LLM output with markdown const llmOutput = Here's the data you requested: \\ \\ \\ json { \"users\": [ {\"name\": \"Alice\", \"age\": 30}, {\"name\": \"Bob\", \"age\": 25} ], \"total\": 2 } \\ \\ \\ This JSON contains the user information. ; const result = parser.parse(llmOutput); console.log(result); // Output: { users: [...], total: 2 } typescript const input = \\ \\ \\ json\\n{\"key\": \"value\"}\\n\\ \\ \\ ; const result = parser.parse(input); // { key: \"value\" } typescript const input = '{\"message\": \"He said \"hello\" to me\"}'; const result = parser.parse(input); // { message: 'He said \"hello\" to me' } typescript const input = '{\"status\": \"ok\"} The request was successful.'; const result = parser.parse(input); // { status: \"ok\" } typescript const input = { \"name\": \"John\" \"age\": 30 } ; const result = parser.parse(input); // { name: \"John\", age: 30 } typescript // Objects const input1 = '{\"a\": 1 \"b\": 2 \"c\": 3}'; const result1 = parser.parse(input1); // { a: 1, b: 2, c: 3 } // Arrays const input2 = '[1 2 3 4 5]'; const result2 = parser.parse(input2); // [1, 2, 3, 4, 5] // Complex structures const input3 = '[{\"id\": 1} {\"id\": 2}]'; const result3 = parser.pars","default_branch":null,"files":null,"tree":[],"storefront":"/r/aotakeda","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aotakeda/ai-json-fixer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}