From c8c2e4541ce565d333e9407e6c5edf7ca73bdea6 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 7 Jul 2007 17:15:30 +0000 Subject: * lib/json.rb, lib/json/, ext/json/: import JSON 1.1.1 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/json.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/json.rb') diff --git a/lib/json.rb b/lib/json.rb index 1700e0654..bb711c172 100644 --- a/lib/json.rb +++ b/lib/json.rb @@ -47,6 +47,27 @@ require 'json/common' # # * http://json.rubyforge.org # +# == Usage +# +# To use JSON you can +# require 'json' +# to load the installed variant (either the extension 'json' or the pure +# variant 'json_pure'). If you have installed the extension variant, you can +# pick either the extension variant or the pure variant by typing +# require 'json/ext' +# or +# require 'json/pure' +# +# You can choose to load a set of common additions to ruby core's objects if +# you +# require 'json/add/core' +# +# To get the best compatibility to rails' JSON implementation, you can +# require 'json/add/rails' +# +# Both of the additions attempt to require 'json' (like above) first, if it has +# not been required yet. +# # == Speed Comparisons # # I have created some benchmark results (see the benchmarks subdir of the @@ -207,4 +228,6 @@ module JSON require 'json/pure' end end + + JSON_LOADED = true end -- cgit