lib/json/common.rb in json-1.1.2 vs lib/json/common.rb in json-1.1.3
- old
+ new
@@ -1,10 +1,10 @@
require 'json/version'
module JSON
class << self
- # If _object_ is string like parse the string and return the parsed result
+ # If _object_ is string-like parse the string and return the parsed result
# as a Ruby data structure. Otherwise generate a JSON text from the Ruby
# data structure object and return it.
#
# The _opts_ argument is passed through to generate/parse respectively, see
# generate and parse for their documentation.
@@ -182,11 +182,12 @@
end
obj.to_json(state)
end
# :stopdoc:
- # I want to deprecate these later, so I'll first be silent about them, and later delete them.
+ # I want to deprecate these later, so I'll first be silent about them, and
+ # later delete them.
alias unparse generate
module_function :unparse
# :startdoc:
# Unparse the Ruby data structure _obj_ into a single line JSON string and
@@ -236,11 +237,11 @@
alias pretty_unparse pretty_generate
module_function :pretty_unparse
# :startdoc:
# Load a ruby data structure from a JSON _source_ and return it. A source can
- # either be a string like object, an IO like object, or an object responding
+ # either be a string-like object, an IO like object, or an object responding
# to the read method. If _proc_ was given, it will be called with any nested
# Ruby object as an argument recursively in depth first order.
#
# This method is part of the implementation of the load/dump interface of
# Marshal and YAML.
@@ -325,11 +326,11 @@
puts JSON::pretty_generate(obj, :allow_nan => true, :max_nesting => false)
end
nil
end
- # If _object_ is string like parse the string and return the parsed result as
+ # If _object_ is string-like parse the string and return the parsed result as
# a Ruby data structure. Otherwise generate a JSON text from the Ruby data
# structure object and return it.
#
# The _opts_ argument is passed through to generate/parse respectively, see
# generate and parse for their documentation.
@@ -349,6 +350,5 @@
# the required data.
def json_creatable?
respond_to?(:json_create)
end
end
- # vim: set et sw=2 ts=2: