summaryrefslogtreecommitdiff
path: root/ext/json/lib/json.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/lib/json.rb')
-rw-r--r--ext/json/lib/json.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/json/lib/json.rb b/ext/json/lib/json.rb
index 1e64bfcb1a..807488ffef 100644
--- a/ext/json/lib/json.rb
+++ b/ext/json/lib/json.rb
@@ -285,6 +285,15 @@ require 'json/common'
# # Raises JSON::NestingError (nesting of 2 is too deep):
# JSON.generate(obj, max_nesting: 2)
#
+# ====== Escaping Options
+#
+# Options +script_safe+ (boolean) specifies wether <tt>'\u2028'</tt>, <tt>'\u2029'</tt>
+# and <tt>'/'</tt> should be escaped as to make the JSON object safe to interpolate in script
+# tags.
+#
+# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range
+# should be escaped.
+#
# ====== Output Options
#
# The default formatting options generate the most compact