Code Monkey home page Code Monkey logo

openlaszlo-json's Introduction

= JSON for OpenLaszlo

Author:: Oliver Steele
Copyright:: Copyright 2006 Oliver Steele.  All rights reserved.
Homepage:: http://osteele.com/sources/openlaszlo/json
License:: MIT License.
Version:: 1.0

JSON for OpenLaszlo is an implementation of JSON for the OpenLaszlo platform.  It is an Open Source package available under the MIT License.

== Requirements
Any ECMAScript interpreter or compiler.  (There are {other implementations}[http://www.json.org/] available for Javascript[http://www.json.org/js.html] and ActionScript -- the sole benefit of this implementation is that it's compatible with OpenLaszlo[openlaszlo.org].)

The *.lzx files are OpenLaszlo source files, and require the OpenLaszlo[http://openlaszlo.org] SDK.

== Installation
Download the zip file from http://osteele.com/sources/openlaszlo/json/openlaszlo-json-1.0.zip.

== Usage
  JSON.stringify(123) // => '123'
  JSON.parse('123') // => 123

See the header of json.js for additional usage information.

== Examples

Here is a complete OpenLaszlo program that prints a JSON string, and a parsed object, to the debugger:
  <canvas debug="true">
    <script src="json.js">
    <script>
      Debug.write(JSON.stringify([1729, "argos", {a: 1}]));
      Debug.write(JSON.parse('[1729, "argos", {"a": 1}]'));
    </script>
  </canvas>

For an example of using JSON with AJAX to parse response text, see {json-example.lzx}[json-example.lzx].  This example is also running on the {blog page for this project}[http://osteele.com/archives/2006/02/json-for-openlaszlo].

== Contents
README:: This file
MIT-LICENSE:: The MIT license
json.js:: The implementation
json-example.lzx:: An example of using json.js with AJAX
data:: A directory of static json files, for use with the example
json-tests.lzx:: Unit tests (using LzUnit)
json-test-data.js:: Data for the unit tests

openlaszlo-json's People

Contributors

osteele avatar

Watchers

0r0 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.