# yll_parsejson **Repository Path**: yll10243/yll_parsejson ## Basic Information - **Project Name**: yll_parsejson - **Description**: 参考parse-json的将其依赖的包合并到一个工程中 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-23 - **Last Updated**: 2022-02-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 配置的参考 参考 npm i parse-json的整理 ``` import parseJson, { JSONError } from 'yll_parsejson'; const json = '{\n\t"foo": true,\n}'; try { parseJson(json); } catch (error:any) { if (error instanceof JSONError) { //true error.fileName = 'foo.json'; } throw error; } ```