Class: Crack::JSON

Inherits:
Object show all
Defined in:
lib/crack/json.rb

Class Method Summary collapse

Class Method Details

.parse(json) ⇒ Object



11
12
13
14
15
# File 'lib/crack/json.rb', line 11

def self.parse(json)
  YAML.load(unescape(convert_json_to_yaml(json)))
rescue ArgumentError => e
  raise ParseError, "Invalid JSON string"
end