mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-24 15:51:31 +00:00
9 lines
186 B
Ruby
9 lines
186 B
Ruby
|
class JSONWithIndifferentAccess
|
||
|
def self.load(json)
|
||
|
ActiveSupport::HashWithIndifferentAccess.new(JSON.load(json || '{}'))
|
||
|
end
|
||
|
|
||
|
def self.dump(hash)
|
||
|
JSON.dump(hash)
|
||
|
end
|
||
|
end
|