#json-parser #json-error #json-input #fault-tolerant #json-format #formatter #parse-input

toy-json-formatter

This is a JSON formatter that is built to be fault tolerant from the ground up. Its job is to take any input and do its best to parse it and format it as JSON.

20 releases

new 0.3.7 Oct 27, 2024
0.3.6 Jun 15, 2024
0.3.5 May 4, 2024
0.3.4 Feb 21, 2024
0.1.7 Oct 29, 2023

#2127 in Parser implementations


Used in jfc

MIT license

115KB
2.5K SLoC

toy-json-formatter

This library is a JSON parsing libary with the following goals:

  1. Adhere to the standard JSON specification and parse all valid inputs correctly.
  2. Have extreme fault-tolerance. Any input should still yield a formatted or parsed JSON value regardless of how malformed it is.
  3. All malformed JSON inputs should yield an error to signal that the input has been transformed.

This library reserves the right to change how malformed JSON is transformed back into valid JSON at any time. Calling code should not depend on the implementation details of error recovery. Changes to error recovery strategies will not be considered breaking changes under semver.

Dependencies