Module: ActiveSupport::JSON
- Defined in:
- lib/fidius-common/json_symbol_addon.rb
Overview
ActiveSupports JSON module
Class Method Summary collapse
-
.decode(json) ⇒ Object
Parses a JSON string or IO and convert it into an object.
Class Method Details
.decode(json) ⇒ Object
Parses a JSON string or IO and convert it into an object. Any strings of that object will be converted, if they are prefixed with a :
.
108 109 110 111 112 |
# File 'lib/fidius-common/json_symbol_addon.rb', line 108 def self.decode(json) set_default_backend unless defined?(@backend) result = @backend.decode(json) result.symbolize_keys_if_needed end |