Class: JSONMapper::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/json_mapper/parser.rb

Class Method Summary collapse

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