js / json forked from genki/json

This library can parse JSON texts and generate them from ruby data structures. Install the extension variant (in C) with "gem install json" or install the pure Ruby variant with "gem install json_pure".

This URL has Read+Write access

commit  f90abc52eed9966f840033ba8c87110ace8f74c4
tree    881d335dd0e078a14acd52e0c6bc4a8b4351aa34
parent  0ca3fe834c5de2adc4a585303093ba218f38b191
json /
name age message
file .gitignore Fri Jan 30 18:27:15 -0800 2009 Corresponded to ruby-1.9.1 [genki]
file CHANGES Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
file GPL Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
file README Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
file RUBY Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
file Rakefile Loading commit data...
file TODO Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
file VERSION
directory benchmarks/ Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
directory bin/ Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
directory data/ Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
directory doc-templates/ Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
directory ext/ Fri Jan 30 18:27:15 -0800 2009 Corresponded to ruby-1.9.1 [genki]
file install.rb Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
file json.gemspec
directory lib/
directory tests/
directory tools/ Fri Jan 30 18:12:10 -0800 2009 First commit. [genki]
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 RUBY 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.