We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ede0a7 commit 3845491Copy full SHA for 3845491
lib/json.rb
@@ -45,15 +45,15 @@
45
# Or an alternative way:
46
#
47
# require 'json'
48
-# puts {:hello => "goodbye"}.to_json # => "{\"hello\":\"goodbye\"}"
+# puts({:hello => "goodbye"}.to_json) # => "{\"hello\":\"goodbye\"}"
49
50
# <tt>JSON.generate</tt> only allows objects or arrays to be converted
51
# to JSON syntax. <tt>to_json</tt>, however, accepts many Ruby classes
52
# even though it acts only as a method for serialization:
53
54
55
56
-# 1.to_json => "1"
+# 1.to_json # => "1"
57
58
# The {#generate}[rdoc-ref:JSON#generate] method accepts a variety of options
59
# to set the formatting of string output and defining what input is accepteable.
0 commit comments