Class: JSONMapper::Parser
- Inherits:
-
Object
- Object
- JSONMapper::Parser
- Defined in:
- lib/json_mapper/parser.rb
Class Method Summary collapse
-
.parse(data) ⇒ Object
Parse the JSON string into a Hash.
Class Method Details
.parse(data) ⇒ Object
Parse the JSON string into a Hash
5 6 7 8 |
# File 'lib/json_mapper/parser.rb', line 5 def self.parse(data) return nil if data.nil? || data == "" JSON.parse(data, { :symbolize_names => true }) end |