Re: deJSONKit - serialization as JSON from E

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On May 18, 2009, at 10:20, Tyler Close wrote:
> On Fri, May 15, 2009 at 3:50 PM, Kevin Reid <[email protected]> wrote:
>>    Note that even in strict mode (the default), deJSONKit operates
>> on JSON /value/s, not JSON /object/s; it does not require that the
>> root of the subgraph be a JSON object (E map).
>
> You could stick to the requirement to output a JSON object, rather
> than a JSON value, by adopting the JSONvalue convention:
>
> http://waterken.sourceforge.net/web_send/#JSONvalue

I would rather not build an interpretation of the magic key "=" into  
the recognizer; my intent with deJSONKit is to allow input/output of  
*arbitrary* JSON (but, therefore, not arbitrary Data-E).

If I added support for your "=" I would also add "@", "!", and "$" and  
produce a "represent arbitrary Data-E as Waterken-JSON" library --  
this may in fact become part of my GSoC CapTP-on-Caja project this year.

(Hm, though you don't AFAIK have any syntax for cycles? You have "@",  
and {"@": "#foo"} is well-defined, but there is no convention for  
*defining* fragments of a JSON tree. Could you suggest one so I don't  
have to?)

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.