2013-12-24 17:37:26 -05:00
|
|
|
class JSONWithIndifferentAccess
|
|
|
|
def self.load(json)
|
2013-12-29 22:28:10 -08:00
|
|
|
ActiveSupport::HashWithIndifferentAccess.new(JSON.parse(json || '{}'))
|
2013-12-24 17:37:26 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.dump(hash)
|
|
|
|
JSON.dump(hash)
|
|
|
|
end
|
|
|
|
end
|