unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: [PATCH] ice-9: Add JSON module.
Date: Mon, 21 Sep 2015 22:08:13 +0200	[thread overview]
Message-ID: <87si67zgb6.fsf@gnu.org> (raw)
In-Reply-To: 87vbcg1c4d.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me

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?

> +(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’.




  parent reply	other threads:[~2015-09-21 20:08 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 [this message]
2015-09-22  1:31   ` Matt Wette
2015-09-22  6:49     ` Mark H Weaver
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=87si67zgb6.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    /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).