Method: Object#to_json_safe
- Defined in:
- lib/rmtools/conversions/json.rb
#to_json_safe(options = nil, timeout: 10) ⇒ Object
handy when data may appear non-encodable (active_record objects, recursive structures, etc)
81 82 83 |
# File 'lib/rmtools/conversions/json.rb', line 81 def to_json_safe(=nil, timeout: 10) timeout(timeout) {to_json()} end |