unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Matt Wette <matthew.wette@verizon.net>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: [PATCH] ice-9: Add JSON module.
Date: Tue, 22 Sep 2015 02:49:37 -0400	[thread overview]
Message-ID: <87h9mneyny.fsf@netris.org> (raw)
In-Reply-To: <A40DCD3A-139C-40E1-839D-F54B414A3F1C@verizon.net> (Matt Wette's message of "Mon, 21 Sep 2015 18:31:07 -0700")

Matt Wette <matthew.wette@verizon.net> writes:

>     On Sep 21, 2015, at 1:08 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>
>     
>     David Thompson <davet@gnu.org> 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	other threads:[~2015-09-22  6:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-15 21:21 [PATCH] ice-9: Add JSON module David Thompson
2015-08-16  1:33 ` David Thompson
2015-08-17 15:10   ` Christopher Allan Webber
2015-09-21 20:08 ` Ludovic Courtès
2015-09-22  1:31   ` Matt Wette
2015-09-22  6:49     ` Mark H Weaver [this message]
2015-09-22 12:43       ` Matt Wette
2015-09-22  6:46 ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9mneyny.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=matthew.wette@verizon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).