JSON Parser

(import (macduffie json))

(macduffie json) is just a simple JSON parser. This library is now based on the SchemeSpheres JSON parser, and no longer has any code from Dominique Boucher. With this change, the license is now Expat (MIT). Furthermore, the parser looks close to standards compliant, but there remains a problem with Unicode surrogate pairs.

This library depends on (srfi 69) to represent JSON objects. Otherwise, only scheme-small libraries are used.

This library is regularly tested in Chibi, Kawa, and Gauche (in R7RS-strict mode).

Library Procedures

To do:

Performance

This library will not work well for very large files. According to my tests, here are the relative performance of Chibi, Kawa, and Gauche:

Data types

Note that keys are internally represented as symbols.

Scheme JSON
Hash table (srfi 69) Object
List Array
String String
Number Number
#t true
#f false
json-null record type null