Skip to content

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.)

8 Comments

  1. alpheccar wrote:

    The link http://osteele.com/sources/openlaszlo/json.zip is not working :-(

    Monday, February 20, 2006 at 5:16 pm | Permalink
  2. Oliver wrote:

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

    Monday, February 20, 2006 at 6:20 pm | Permalink
  3. [...] Feed « “Stretch” Languages, or, 28 years of programming JSON for OpenLaszlo » [...]

    Thursday, March 2, 2006 at 8:57 pm | Permalink
  4. Walter wrote:

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

    Wednesday, March 12, 2008 at 2:18 am | Permalink
  5. I’ve tested http://osteele.com/sources/openlaszlo/json/openlaszlo-json-1.0.zip and it’s definitely a working file. Thanks Osteele.

    Sunday, May 25, 2008 at 12:42 pm | Permalink
  6. Thanks for the link.

    Thursday, January 8, 2009 at 1:37 am | Permalink
  7. Thanks for info. Very useful to me.

    Saturday, January 10, 2009 at 9:14 am | Permalink
  8. Justin Clift wrote:

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

    Monday, January 12, 2009 at 9:41 am | Permalink