# json-fixer **Repository Path**: SuperWindcloud/json-fixer ## Basic Information - **Project Name**: json-fixer - **Description**: php 修复错误json的库 - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-10 - **Last Updated**: 2025-01-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # json-fixer #### 介绍 ## php 修复错误json的库 ```php $json = (new Fixer)->fix('{"a":1,"b":2'); // {"a":1,"b":2} $json = (new Fixer)->fix('{"a":1,"b":true,'); // {"a":1,"b":true} $json = (new Fixer)->fix('{"b":[1,[{"b":1,"c"'); // {"b":[1,[{"b":1,"c":null}]]} // For batch fixing, you can just reuse same fixer instance: $fixer = new Fixer; $fixer->fix('...'); $fixer->fix('...'); ```