class String

Extension to String for deserializing JSON

Public Instance Methods

deserialize() click to toggle source

Convert this {String} into a JSON Hash

@raise [WeeseError] If JSON parse fails

@return [Hash] Hash representing the given JSON

# File lib/weese/deserialize.rb, line 14
def deserialize
  JSON.parse(self)
rescue JSON::ParserError => e
  raise WeeseError, e.to_s
end