Class: Compel::Coercion::JSON
- Defined in:
- lib/compel/coercion/types/json.rb
Instance Attribute Summary
Attributes inherited from Type
Instance Method Summary collapse
Methods inherited from Type
Constructor Details
This class inherits a constructor from Compel::Coercion::Type
Instance Method Details
#coerce_value ⇒ Object
6 7 8 |
# File 'lib/compel/coercion/types/json.rb', line 6 def coerce_value ::JSON.parse(value) rescue nil end |