guile-user
[Top][All Lists]
Advanced

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

Re: 3 different json projects


From: Thompson, David
Subject: Re: 3 different json projects
Date: Thu, 13 Dec 2018 12:24:52 -0500

On Thu, Dec 13, 2018 at 9:53 AM Catonano <address@hidden> wrote:
>
> This is not strictly about guile-json, it's somewhat tangential
>
> In the thread announcing guile-json 2.0, I learned that David Thompson uses
> his own json processing thing
>
> There is also guile-sjson by Christopher Allan Webber
>
> And then there's guile-json
>
> This amounts to 3 different projects for dealing with Json
>
> Wouldn't it be sensible trying to integrate the 3 projects ?
>
> Having a single project would allow to concentrate the efforts instead of
> scattering them

I don't think the proliferation of these implementations is a bad
thing.  We have multiple people experimenting with how best to
represent JSON in Guile, with pros and cons to each, and that is
healthy and the right way to approach things, IMO.  What I wouldn't
want is for Guile to add a JSON module that sucks and be stuck with it
for a long time. It's good to let the library people chew on the
problem for awhile and let the best design emerge from the process.

On the other hand, the implementations have existed for years now and
I think Guile is overdue for choosing a "blessed" implementation for
its standard library that will settle the matter for most users who
just want to parse something quickly and move on with life instead of
having to choose from a bunch of third-party options. The presence of
the sxml modules in the standard library means that nearly everyone
using Guile is using the same interface for working with XML and that
is good.

A brief history of Guile JSON modules: guile-json came first and has
the most adoption.  I think the most notable project that uses it
heavily is GNU Guix. I decided to write my own implementation because
I didn't like the use of hash tables for representing JSON objects and
Aleix wanted to continue using them.  I submitted my implementation to
guile-devel.  The Guile maintainers wanted a number of implementation
details cleaned up or otherwise fixed and it was more work than I was
willing to take on at the time so it was never merged and I moved on
to other things.  Chris preferred my implementation to that of
guile-json's, but didn't like that there was no way to use it other
than snarfing the file from the Guile mailing list into each project
that needed it, so he made guile-sjson.  Chris made a few changes,
such as adding support for Andy Wingo's "fash" (functional hash table)
for JSON objects, but mostly it's the same code I submitted to
guile-devel.  For my own projects, I just copy in the pieces of my
implementation that I need.  For example, Chickadee includes just the
JSON parser.

I don't know what the path is for getting a JSON module into Guile
after all these years.  Not having any kind of consensus on the
preferred data structure is the biggest blocker.

- Dave



reply via email to

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