class Shrine::Plugins::Column::JsonSerializer

  1. lib/shrine/plugins/column.rb
Superclass: Object

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.

Methods

Public Class

  1. dump
  2. load

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