[ANN] libJson

Jim Ault JimAultWins at yahoo.com
Wed Jan 7 15:41:48 EST 2009


There are a few gotchas with the 'accommodate anything'.  Apart from issues
like unicode, there are those of intended use.

In the world of PHP, there are functions such as
htmlEntities()       serialize()
addSlashes()  --for storing in SQL databases
--                          this adds escaping "\"

gzip()   
base64() -- url-safe base64 string
line endings (unix, wn32, mac)  CR  CRLF  LF

Looking at the PHP.NET web site should give you a better picture of some of
the variations that cause most programmers to build their own library for
serialization of arrays.  It usually boils down to special uses and needs as
opposed to crafting a general solution.

Let me know if you find a good system :-)

Jim Ault
Las Vegas

On 1/7/09 10:44 AM, "Mark Smith" <lists at futilism.com> wrote:

> Interesting - the thing that I'd like to achieve (apart from xml and
> json) is a general purpose rev array serializer (both for storing to
> files, and transmitting over the network), that can simply acommodate
> anything that a rev array can, including binary data, but that
> doesn't require any pre-processing of an array from the user. So it
> would know when to base64encode or whatever, and would know how to
> unserialize and so-on. Ideally, it would be somewhat human-readable,
> too.
> 
> Best,
> 
> Mark
> 
> On 7 Jan 2009, at 18:28, Jim Ault wrote:
> 
>> On 1/7/09 9:26 AM, "Mark Smith" <lists at futilism.com> wrote:
>> 
>>> My main motivation for it was as a way of serializing arrays, so that
>>> I can pass them easily between a client and rev cgis on a server. It
>>> seemed like it might be useful to do it in a a way that doesn't re-
>>> invent the wheel, and was abit 'lighter' than xml, so - json.
>>> 
>>> Mark
>> 
>> I, too, am just finishing a Rev-JSON-Rev set of routines to take
>> advantage
>> of a specialty web-javascript engine I found last year.  The JSON
>> format is
>> much more compact that the XML equivalent, plus I added another
>> 'linking'
>> dimension to the normal tree-logic.
>> 
>> Works very well but is definitely not a general solution or
>> library.  After
>> this is up and running, I will be converting some of the javascript
>> to Rev
>> CGI.  However, most of the javascript must remain since Rev does
>> not run in
>> the browser on the client's machine.
>> 
>> Jim Ault
>> Las Vegas
>> 
>>> On 7 Jan 2009, at 17:03, Bob Sneidar wrote:
>>> 
>>>> What would be the advantage to this? Is it some kind of API to pass
>>>> data back and forth between java applications and revolution?
>>>> 
>>>> Bob Sneidar
>>>> IT Manager
>>>> Logos Management
>>>> Calvary Chapel CM
>>>> 
>>>> On Jan 7, 2009, at 8:22 AM, Mark Smith wrote:
>>>> 
>>>>> Here's a first go at a json parser/generator that converts between
>>>>> revolution arrays and json objects/arrays, to an arbitrary level of
>>>>> nesting. It has some basic formatting capability also.
>>>>> 
>>>>> As usual, any observations, modifications, disasters or other
>>>>> comments welcome.
>>>>> 
>>>>> 
>>>>> http://futsoft.futilism.com/revolutionstuff.html
>>>>> 
>>>>> Best,
>>>>> 
>>>>> Mark
>>>>> _______________________________________________
>>>>> use-revolution mailing list
>>>>> use-revolution at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>> 
>>>> _______________________________________________
>>>> use-revolution mailing list
>>>> use-revolution at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>> 
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription
>>> preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
>> 
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list