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: Mark H Weaver
Subject: Re: [PATCH] ice-9: Add JSON module.
Date: Tue, 22 Sep 2015 02:49:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Matt Wette <address@hidden> writes:

>     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
>     core.
>     
>     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.

Agreed.

> 1. There is a minor typo in the source: should be "denominator.”

Indeed, good catch!

> 2. The comments say integers are converted to exact and floating point
> to inexact, but the code will convert 1.0 to exact.

In Scheme terminology, 1.0 is an integer.

>     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.

Agreed.  The simplicity also allows confidence that it can safely handle
potentially malicious JSON data.

      Mark



reply via email to

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