summaryrefslogtreecommitdiff
path: root/lib/json/common.rb
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2009-11-25 02:19:07 +0100
committerFlorian Frank <flori@ping.de>2009-11-25 02:19:07 +0100
commit5f420debe6291197e97965b859c4a51f587c0144 (patch)
tree75249c550346bd071ff10a6aa27d7b3b2f965e91 /lib/json/common.rb
parent31132c364e92eb887f7d1c4178f71930a8e35c5d (diff)
downloadjson-5f420debe6291197e97965b859c4a51f587c0144.tar.gz
implemented symbolize_names feature, #8
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r--lib/json/common.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb
index 39f6336..2f1584e 100644
--- a/lib/json/common.rb
+++ b/lib/json/common.rb
@@ -116,9 +116,14 @@ module JSON
# * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
# defiance of RFC 4627 to be parsed by the Parser. This option defaults
# to false.
+ # * *symbolize_names*: If set to true, returns symbols for the names
+ # (keys) in a JSON object. Otherwise strings are returned, which is also
+ # the default.
# * *create_additions*: If set to false, the Parser doesn't create
# additions even if a matchin class and create_id was found. This option
# defaults to true.
+ # * *object_class*: Defaults to Hash
+ # * *array_class*: Defaults to Array
def parse(source, opts = {})
JSON.parser.new(source, opts).parse
end