summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/bigdecimal.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2023-11-16 15:46:01 -0600
committergit <svn-admin@ruby-lang.org>2023-12-06 14:59:23 +0000
commitdab5a4b61aa43bd67221e89df9de67de0e3a97f6 (patch)
tree536a65ec6c8345644035d59acdc0144d27043c96 /ext/bigdecimal/bigdecimal.c
parent018dbf18d50b34a3ea564bfe0264a423de4b33bb (diff)
[ruby/bigdecimal] [DOC] Add section Methods for Working with JSON
https://github.com/ruby/bigdecimal/commit/2edd8d0a23
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r--ext/bigdecimal/bigdecimal.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 07c2bcf0b5..3234023f68 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -4363,7 +4363,20 @@ BigDecimal_negative_zero(void)
* (2/3r).to_d(3) # => 0.667e0
* "0.5".to_d # => 0.5e0
*
- * == License
+ * == Methods for Working with \JSON
+ *
+ * - {::json_create}[rdoc-ref:BigDecimal.json_create]:
+ * Returns a new \BigDecimal object constructed from the given object.
+ * - {#as_json}[rdoc-ref:BigDecimal#as_json]:
+ * Returns a 2-element hash representing +self+.
+ * - {#to_json}[rdoc-ref:BigDecimal#to_json]:
+ * Returns a \JSON string representing +self+.
+ *
+ * To make these methods available:
+ *
+ * require 'json/add/bigdecimal'
+ *
+ * * == License
*
* Copyright (C) 2002 by Shigeo Kobayashi <shigeo@tinyforest.gr.jp>.
*