chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] [announce] JSON egg version 2.0


From: John Cowan
Subject: [Chicken-users] [announce] JSON egg version 2.0
Date: Fri, 9 Feb 2007 14:03:18 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

I have just completed a major rewrite of Tony Garnock-Jones's JSON egg.
It's temporarily available at http://www.ccil.org/temp/json.egg .
The JSON parser is untouched; however, the JSON generator has been
completely redesigned.  Here are the new features:

1) A Scheme object is completely validated for writability before any
part of it is written.

2) An a-list (list of pairs) will be written as a JSON object (structure).
Likewise, a vector containing writable objects rather than pairs will
be written as a JSON list.  (However, an empty Scheme list is written as
a JSON list, whereas an empty Scheme vector is written as a JSON object.)

3) It is possible to add support for printing an arbitrary Scheme
type as a JSON null, boolean, number, string, list, or object.
You need to provide a few procedures for recognizing, writing, and
walking the Scheme object, and pass them to json-add-atomic-type! or
json-add-collection-type!

4) json-writable? and json-name? are exposed; they are true if the
argument is writable as a JSON value or a JSON string respectively.

Bugs and comments to me.  Thanks and kudos to Tony for his parser.

-- 
John Cowan    http://ccil.org/~cowan    address@hidden
SAXParserFactory [is] a hideous, evil monstrosity of a class that should
be hung, shot, beheaded, drawn and quartered, burned at the stake,
buried in unconsecrated ground, dug up, cremated, and the ashes tossed
in the Tiber while the complete cast of Wicked sings "Ding dong, the
witch is dead."  --Elliotte Rusty Harold on xml-dev




reply via email to

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