lib/boom/config.rb in boom-0.2.1 vs lib/boom/config.rb in boom-0.2.2
- old
+ new
@@ -72,17 +72,17 @@
# Public: loads and parses the JSON tree from disk into memory and stores
# it in the attributes Hash.
#
# Returns nothing.
def load_attributes
- @attributes = JSON.parse(File.new(file, 'r').read)
+ @attributes = MultiJson.decode(File.new(file, 'r').read)
end
# Public: writes the in-memory JSON Hash to disk.
#
# Returns nothing.
def save
- json = JSON.generate(attributes)
+ json = MultiJson.encode(attributes)
File.open(file, 'w') {|f| f.write(json) }
end
end
end