josdejong/jsonrepair

Exporting parse function

Open

#154 创建于 2026年2月22日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)TypeScript (83 fork)github user discovery
enhancementhelp wanted

仓库指标

Star
 (2,359 star)
PR 合并指标
 (PR 指标待抓取)

描述

👋 @josdejong! Great useful package!

I found myself doing this in a few places:

const repairedJson = jsonrepair(rawJson);
const parsedJson = JSON.parse(repairedJson);

This works well, but could be more efficient:

const parsedJson = repairAndParseJson(rawJson);

If this is available to end users, jsonrepair won't have to serialize a repaired structure back to a string. As a result, less memory and CPU will be used. WDYT of exposing some kind of a repair and parse function for the library?

贡献者指南