Class: Crackoid::JSON

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

Class Method Summary collapse

Class Method Details

.parse(json) ⇒ Object



11
12
13
14
15
# File 'lib/crackoid/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