JSON for OpenLaszlo

JSON for OpenLaszlo is a JSON library for OpenLaszlo.

I wrote this in order to implement my regular expression visualizer.

There’s a live example below. Clicking on a button requests some JSON text from the server and parses it on the client. The source code to the example is here.

(When it runs off my web site, the debugger in the example displays a warning about not being able to connect to the LPS server. This means that the debugger can’t evaluate expressions, as it could if you were running it off the SDK. I’m just using the debugger here to print inspectable representations of the JSON parse results, and the warning doesn’t affect this.)

Rationale

OpenLaszlo implements most of JavaScript 1.5 (ECMAScript 3), but it’s missing regular expressions and throw/catch, so it can’t run JSON in JavaScript. And the OpenLaszlo compiler doesn’t (yet) implement the proposed JavaScript 2.0 (ECMAScript 4) extensions such as class and type declarations, so JSON in ActionScript doesn’t work either. Hence, this implementation, which doesn’t require either regular expressions or JavaScript 2.0 extensions.

It’s open source, of course. (MIT License.)

Posted: February 20th, 2006
Categories: JavaScript, Libraries, OpenLaszlo, Projects
Tags:
Comments: 8 Comments.
Comments
Comment from alpheccar - February 20, 2006 at 5:16 pm
Comment from Oliver - February 20, 2006 at 6:20 pm

Oops! The correct link is http://osteele.com/sources/openlaszlo/json/openlaszlo-json-1.0.zip. I think I’ve updated it everywhere…

[...] Feed « “Stretch” Languages, or, 28 years of programming JSON for OpenLaszlo » [...]

Comment from Walter - March 12, 2008 at 2:18 am

Nice little tool, I’ve just started working with regular expressions myself, your site is very useful.

Comment from SEO Singapore - May 25, 2008 at 12:42 pm

I’ve tested http://osteele.com/sources/openlaszlo/json/openlaszlo-json-1.0.zip and it’s definitely a working file. Thanks Osteele.

Comment from Niche Blueprint Bonus - January 8, 2009 at 1:37 am

Thanks for the link.

Comment from Niche Blueprint Bonus - January 10, 2009 at 9:14 am

Thanks for info. Very useful to me.

Comment from Justin Clift - January 12, 2009 at 9:41 am

Oops, the source code for the example is not working. (404)