diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-07 17:15:30 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-07 17:15:30 +0000 |
commit | c8c2e4541ce565d333e9407e6c5edf7ca73bdea6 (patch) | |
tree | a7a8a5c2ed9fc9c94759cb02fc9a789d9885387e /lib/json.rb | |
parent | f2fc478054edd33a8b574475d4f6704e4a6db747 (diff) | |
download | ruby-c8c2e4541ce565d333e9407e6c5edf7ca73bdea6.tar.gz ruby-c8c2e4541ce565d333e9407e6c5edf7ca73bdea6.tar.xz ruby-c8c2e4541ce565d333e9407e6c5edf7ca73bdea6.zip |
* 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
Diffstat (limited to 'lib/json.rb')
-rw-r--r-- | lib/json.rb | 23 |
1 files changed, 23 insertions, 0 deletions
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 |