Skip to content

Gauche Scheme wrapper for json-c

License

Notifications You must be signed in to change notification settings

fbrosda/gauche-json-c

Repository files navigation

gauche-json-c

This is a small wrapper around the c library json-c, to use it from Gauche Scheme. The problem with the provided module rfc.json is, that it is extremely slow for larger files.

This modules provides three functions parse-json, parse-json* and parse-json-string, so replacing the integrated rfc.json module should be straight forward.

Limitations

  • parse-json* assumes one valid JSON entry per line.
  • As json-c uses 64 bit (u)int internally the max/min values for integers are 18446744073709551615/-9223372036854775808 respectively.

Todo

  • [X] map null to ‘null, currently it’s mapped to ()
  • [ ] max nesting depth of json objects/arrays is currently 128, make this dynamic
  • [ ] add other json utility functions
  • [X] import stuff from rfc.json and reexport for convenience