Module: BSON::JSON
- Defined in:
- lib/bson/json.rb
Overview
Provides common behaviour for JSON serialization of objects.
Instance Method Summary collapse
-
#to_json(*args) ⇒ String
Converting an object to JSON simply gets it’s hash representation via as_json, then converts it to a string.
Instance Method Details
#to_json(*args) ⇒ String
Note:
All types must implement as_json.
Converting an object to JSON simply gets it’s hash representation via as_json, then converts it to a string.
33 34 35 |
# File 'lib/bson/json.rb', line 33 def to_json(*args) as_json.to_json(*args) end |