Skip to content

Commit 2edd8d0

Browse files
committed
[DOC] Add section Methods for Working with JSON
1 parent eeccedf commit 2edd8d0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

ext/bigdecimal/bigdecimal.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4363,7 +4363,20 @@ BigDecimal_negative_zero(void)
43634363
* (2/3r).to_d(3) # => 0.667e0
43644364
* "0.5".to_d # => 0.5e0
43654365
*
4366-
* == License
4366+
* == Methods for Working with \JSON
4367+
*
4368+
* - {::json_create}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-c-json_create]:
4369+
* Returns a new \BigDecimal object constructed from the given object.
4370+
* - {#as_json}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-i-as_json]:
4371+
* Returns a 2-element hash representing +self+.
4372+
* - {#to_json}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-i-to_json]:
4373+
* Returns a \JSON string representing +self+.
4374+
*
4375+
* To make these methods available:
4376+
*
4377+
* require 'json/add/bigdecimal'
4378+
*
4379+
* * == License
43674380
*
43684381
* Copyright (C) 2002 by Shigeo Kobayashi <shigeo@tinyforest.gr.jp>.
43694382
*

0 commit comments

Comments
 (0)