abhiyerra / json forked from flori/json

JSON implementation for Ruby

This URL has Read+Write access

json /
name age message
file .gitignore Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
file CHANGES Mon Aug 31 10:05:08 -0700 2009 bumped version for new change [flori]
file COPYING Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
file GPL Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
file README Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
file Rakefile Sun Sep 06 06:30:49 -0700 2009 When installing if it is JRuby then install the... [abhiyerra]
file TODO Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
file VERSION Mon Aug 31 10:05:08 -0700 2009 bumped version for new change [flori]
directory benchmarks/ Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
directory bin/ Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
directory data/ Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
directory diagrams/ Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
file doc-main.txt Mon Aug 24 09:12:27 -0700 2009 better headlines [flori]
directory ext/ Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
file install.rb Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
directory lib/ Wed Sep 02 02:37:41 -0700 2009 Merge branch 'master' of git@github.com:/flori/... [flori]
directory tests/ Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
directory tools/ Mon Aug 24 07:20:32 -0700 2009 initial commit [flori]
README
Dependencies for Building
=========================

- You need rake to build the extensions and install them.

  You can get it from rubyforge:
    http://rubyforge.org/projects/rake

  or just type

  # gem install rake

  for the installation via rubygems.

- If you want to rebuild the parser.c file or draw nice graphviz images of the
  state machines, you need ragel from:
    http://www.cs.queensu.ca/~thurston/ragel

Installation
============

It's recommended to use the extension variant of JSON, because it's quite a bit
faster than the pure ruby variant. If you cannot build it on your system, you
can settle for the latter.

Just type into the command line as root:

# rake install

The above command will build the extensions and install them on your system.

# rake install_pure

or

# ruby install.rb

will just install the pure ruby implementation of JSON.

If you use Rubygems you can type

# gem install json

instead, to install the newest JSON version.

There is also a pure ruby json only variant of the gem, that can be installed
with:

# gem install json_pure

Testing and Examples
====================

To run the tests type:

$ rake test_ext

This will build the extensions first and then test them.

$ rake test_pure

This will test the pure ruby extensions.

There is also a small example in tools/server.rb if you want to see, how
receiving a JSON object from a webrick server in your browser with the
javasript prototype library (http://www.prototypejs.org) works.

Author
======

Florian Frank <flori@ping.de>

License
=======

Ruby License, see the COPYING file included in the source distribution. The
Ruby License includes the GNU General Public License (GPL), Version 2, so see
the file GPL as well.