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

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

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

#2322 in Parser implementations

Download history 66/week @ 2024-07-26 6/week @ 2024-08-02 9/week @ 2024-09-20 3/week @ 2024-09-27 1/week @ 2024-10-04 122/week @ 2024-10-25 13/week @ 2024-11-01

135 downloads per month
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