Class: Blacklight::Types::JsonValue

Inherits:
Value
  • Object
show all
Defined in:
app/values/blacklight/types.rb

Instance Method Summary collapse

Methods inherited from Value

coerce

Instance Method Details

#cast(input) ⇒ Object



88
89
90
91
92
93
94
# File 'app/values/blacklight/types.rb', line 88

def cast(input)
  value = super

  return value unless value.is_a?(String)

  JSON.parse(value)
end