summaryrefslogtreecommitdiff
path: root/lib/json.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-07 17:15:30 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-07 17:15:30 +0000
commit322003ef8f2c36d24f1d009eda5408102f5658ae (patch)
treea7a8a5c2ed9fc9c94759cb02fc9a789d9885387e /lib/json.rb
parentacbffce267b63bb06281f3ebe6a8bb0d897d4566 (diff)
* lib/json.rb, lib/json/, ext/json/:
import JSON 1.1.1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/json.rb')
-rw-r--r--lib/json.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/json.rb b/lib/json.rb
index 1700e0654b..bb711c1724 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