JSON.dump and JSON.load shouldn’t be used with untrusted input, so we create this wrapper class which calls JSON.generate and JSON.parse instead.
Public Class methods
dump(data)
[show source]
# File lib/shrine/plugins/column.rb 90 def self.dump(data) 91 JSON.generate(data) 92 end
load(data)
[show source]
# File lib/shrine/plugins/column.rb 94 def self.load(data) 95 JSON.parse(data) 96 end