guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ice-9: Add JSON module.


From: Ludovic Courtès
Subject: Re: [PATCH] ice-9: Add JSON module.
Date: Mon, 21 Sep 2015 22:08:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

David Thompson <address@hidden> skribis:

> JSON is an commonly encountered format when writing web applications,
> much like XML, and I think it would be a good idea if the core Guile
> distribution had an SXML equivalent for JSON.  This patch introduces
> such an interface in the (ice-9 json) module.

There’s also guile-json, bindings to a C library, but I think it’s
better to have a pure Scheme implementation, and to have it in Guile
core.

I wonder if we should introduce it in 2.0.  What do people think?

> +(define (json-error port)
> +  (throw 'json-error port))

This won’t print correctly, unless there’s an exception printer
installed in boot-9.scm (see ‘getaddrinfo-error’ for instance.)  Could
you add one?

Also, I think we need more details about the error: parse error, what
kind, etc.

Would it work to use the parser from (language ecmascript parse),
possibly restricting it?  Or do you think it’s more viable to have a
separate parser because there are too many differences?

Is there a standard test suite that we could test it against, somehow?

Otherwise LGTM.

Thanks, and sorry for the delay!

Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]