class Shrine::Plugins::Column::JsonSerializer
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)
click to toggle source
# File lib/shrine/plugins/column.rb, line 90 def self.dump(data) JSON.generate(data) end
load(data)
click to toggle source
# File lib/shrine/plugins/column.rb, line 94 def self.load(data) JSON.parse(data) end