Class: SugoiPrettyJSON::HashPaser

Inherits:
Object
  • Object
show all
Defined in:
lib/sugoi_pretty_json/sugoi_json.rb

Class Method Summary collapse

Class Method Details

.parse(string) ⇒ Object



3
4
5
6
7
# File 'lib/sugoi_pretty_json/sugoi_json.rb', line 3

def self.parse(string)
  string.gsub!('=>', ':')
  string.gsub!(/\r|\n/, '')
  JSON.parse(string)
end