{"id":25187,"library":"durable-json-lint","title":"durable-json-lint","description":"A Json Lint library (v0.0.3, last updated in 2012) that parses and partially corrects dirty JSON without crashing. It can fix common errors like single quotes, hex numbers, and function calls, and returns corrected JSON alongside error details. Unlike most JSON linters, it continues parsing after errors and substitutes invalid constructs with null. Written in CoffeeScript, runs on Node >=0.4.0 and browsers. Low release cadence and minimal maintenance since 2013.","status":"abandoned","version":"0.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/freethenation/durable-json-lint","tags":["javascript","json","lint","durable","validation","coffeescript"],"install":[{"cmd":"npm install durable-json-lint","lang":"bash","label":"npm"},{"cmd":"yarn add durable-json-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add durable-json-lint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package does not specify ESM; CommonJS require works, but ESM import is more modern.","wrong":"const durableJsonLint = require('durable-json-lint')","symbol":"default","correct":"import durableJsonLint from 'durable-json-lint'"},{"note":"Only default export; named import will fail.","wrong":"import { durableJsonLint } from 'durable-json-lint'","symbol":"default","correct":"const durableJsonLint = require('durable-json-lint')"},{"note":"Package has no TypeScript types; use @types/durable-json-lint or define own.","wrong":"No type definitions exist","symbol":"TypeScript types","correct":"import durableJsonLint from 'durable-json-lint' // then declare type manually"}],"quickstart":{"code":"import durableJsonLint from 'durable-json-lint';\n\nconst result = durableJsonLint(`{name:\"value\", 'array':[call(), 0x11]}`);\nconsole.log('Corrected JSON:', result.json);\nconsole.log('Errors:', JSON.stringify(result.errors, null, 2));","lang":"javascript","description":"Demonstrates linting dirty JSON with single quotes, function call, hex number and viewing corrected output and errors."},"warnings":[{"fix":"Consider using a maintained JSON linter like jsonlint or ajv.","message":"Package is largely unmaintained since 2013; may not work with modern Node versions beyond 0.4.x.","severity":"deprecated","affected_versions":">=0.0.3"},{"fix":"Wrap call in try-catch to handle crashes; check result.json for null.","message":"Error status 'crash' indicates parser completely failed; no JSON returned.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Always inspect errors array to understand substitutions.","message":"The library substitutes invalid constructs with null without warning in corrected output.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use npm 1.x or precompile; on modern Node, install coffee-script globally or use an alternative.","message":"Package uses CoffeeScript; Node.js may require a CoffeeScript runtime to require if compiled .js missing.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Do not present user-facing errors directly.","message":"Error descriptions may be humorous or sarcastic, not suitable for production error messages.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install coffee-script: npm install coffee-script","cause":"Package's require may attempt to load CoffeeScript at runtime.","error":"Error: Cannot find module 'coffee-script'"},{"fix":"Use import durableJsonLint from 'durable-json-lint' or const durableJsonLint = require('durable-json-lint')","cause":"Incorrect import: using named import instead of default.","error":"TypeError: durableJsonLint is not a function"},{"fix":"Use import syntax or a bundler like webpack.","cause":"Using CommonJS require in ESM environment without bundler.","error":"Uncaught ReferenceError: require is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}