[Top][All Lists]

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

guile-sjson's first public release (v0.2)!

From: Christopher Allan Webber
Subject: guile-sjson's first public release (v0.2)!
Date: Mon, 24 Apr 2017 23:18:09 -0500
User-agent: mu4e 0.9.18; emacs 25.2.1

Hello all!  I'm happy to announce the first public release of

What's guile-sjson?  Well, it's basically the previous work David
Thompson did on (ice-9 json), but since that seemed to sit without being
merged for a while and I needed it for several projects, I went ahead
and turned it into a module, with Dave's blessing.

Here's the repo:

And as for the release:

You can see some more about it on its README:

In sum though, it has a nice s-expression based syntax:

  scheme@(guile-user)> (define a-horse
                        '(@ ("name" "buttercup")
                            ("age" 6)
                            ("animal" "horse")
                            ("noise" "neigh!")
                            ("food" ("carrot" "oats"))))
                            scheme@(guile-user)> (json-pprint a-horse)
    "name": "buttercup",
    "age": 6,
    "animal": "horse",
    "noise": "neigh!",
    "food": [

However, since I'm using this for some fancy linked data stuff using
json-ld, linear access on the hashmaps wasn't great.  No problem!  I
bundled Andy Wingo's fash.scm in the package:

  scheme@(guile-user)> (read-json-from-string "{\"some-key\": \"some-value\"}"
                                              #:use-fash #t)
  $2 = #<fash ((some-key . some-value))>

This also means that since there isn't any other package of fash.scm
right now that I know of, guile-sjson is also a reasonable if roundabout
way to get fashes :)

Anyway, there are also some useful utilities for slicing and dicing
json objects in (sjson utils), so check those out also!

And right after this email, I'm going to submit this to Guix, so
hopefully it'll be in Guix soon as well!

Happy hacking!
 - Chris

Attachment: signature.asc
Description: PGP signature

reply via email to

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