[Top][All Lists]

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

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

From: Matt Wette
Subject: Re: [PATCH] ice-9: Add JSON module.
Date: Mon, 21 Sep 2015 18:31:07 -0700

On Sep 21, 2015, at 1:08 PM, Ludovic Courtès <address@hidden> wrote:

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

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

I would be happy to have this in the core; I have used it.  A few comments:

1. There is a minor typo in the source: should be "denominator.”
2. The comments say integers are converted to exact and floating point to inexact, but the code will convert 1.0 to exact.

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?

I vote for separate parser, the json.scm file is lightweight.  json.scm.go is < 17k.

reply via email to

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