Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Add section Methods for Working with JSON #275

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion ext/bigdecimal/bigdecimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-c-json_create]:
* Returns a new \BigDecimal object constructed from the given object.
* - {#as_json}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-i-as_json]:
* Returns a 2-element hash representing +self+.
* - {#to_json}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-i-to_json]:
* Returns a \JSON string representing +self+.
*
* To make these methods available:
*
* require 'json/add/bigdecimal'
*
* * == License
*
* Copyright (C) 2002 by Shigeo Kobayashi <[email protected]>.
*
Expand Down