mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-21 14:21:22 +00:00
9 lines
No EOL
187 B
Ruby
9 lines
No EOL
187 B
Ruby
class JSONWithIndifferentAccess
|
|
def self.load(json)
|
|
ActiveSupport::HashWithIndifferentAccess.new(JSON.parse(json || '{}'))
|
|
end
|
|
|
|
def self.dump(hash)
|
|
JSON.dump(hash)
|
|
end
|
|
end |