1.0.0 • Published 8 months ago

json-error-finder v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

JSON Error Finder

A lightweight utility to find errors in JSON strings and provide detailed hints.

Installation

Usage

const findJsonError = require('json-error-finder');

const result = findJsonError('{"key": "value",}'); // Invalid JSON
console.log(result);
// Output:
// {
//   valid: false,
//   error: {
//     message: 'Unexpected token } in JSON at position 18',
//     position: 18,
//     hint: 'Error near: "value",}"'
//   }
// }
1.0.0

8 months ago