JSON for OpenLaszlo 8

Posted by Oliver on February 20, 2006

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

Trackbacks

Trackbacks are closed.

Comments

Comments are closed.

  1. alpheccar Mon, 20 Feb 2006 17:16:30 PST
  2. Oliver Mon, 20 Feb 2006 18:20:47 PST

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

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

  4. Walter Wed, 12 Mar 2008 02:18:48 PDT

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

  5. SEO Singapore Sun, 25 May 2008 12:42:36 PDT

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

  6. Niche Blueprint Bonus Thu, 08 Jan 2009 01:37:35 PST

    Thanks for the link.

  7. Niche Blueprint Bonus Sat, 10 Jan 2009 09:14:55 PST

    Thanks for info. Very useful to me.

  8. Justin Clift Mon, 12 Jan 2009 09:41:19 PST

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