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, #initialize

Constructor Details

This class inherits a constructor from Blacklight::Types::Value

Instance Method Details

#cast(input) ⇒ Object



92
93
94
95
96
97
98
# File 'app/values/blacklight/types.rb', line 92

def cast(input)
  value = super

  return value unless value.is_a?(String)

  JSON.parse(value)
end