guile-user
[Top][All Lists]
Advanced

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

Re: guile-json 2.0.0 released


From: Thompson, David
Subject: Re: guile-json 2.0.0 released
Date: Thu, 13 Dec 2018 09:30:36 -0500

On Thu, Dec 13, 2018 at 12:56 AM Aleix Conchillo Flaqué
<address@hidden> wrote:
>
> Hi,
>
> I'm pleased to announce a new guile-json release 2.0.0. This is a
> breaking change release. It is not possible anymore to specify a JSON
> object using alists. Instead alist->hash-table needs to be explicitly
> used (examples can be found on the github page). This makes the
> bidirectional mapping between Guile hash-tables and JSON objects
> consistent.
>
> https://github.com/aconchillo/guile-json

I'm a little disappointed to see this change.  There are a few major
issues with using hash tables for this purpose:

* They have no read syntax
* They use a procedural, mutable API
* They are slower than alists when the number of keys is small, which
is 99% of the time when dealing with serializing objects

For these reasons I do not use hash tables in my JSON
parser/serializer that I submitted to Guile years ago (but was never
merged) and use in many of my own projects.

Why not do something like Racket does and use vectors for JSON arrays
and alists for JSON objects? It's not the ideal API IMO, but this way
only core data types with read syntax are used and is an improvement
over using hash tables.

- Dave



reply via email to

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