Class: Decanter::Parser::JsonParser
- Inherits:
-
ValueParser
- Object
- Base
- ValueParser
- Decanter::Parser::JsonParser
- Defined in:
- lib/decanter/parser/json_parser.rb
Class Method Summary collapse
Methods inherited from ValueParser
Methods included from Core
Class Method Details
.parse_json(val) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/decanter/parser/json_parser.rb', line 11 def self.parse_json(val) begin JSON.parse(val) rescue raise Decanter::ParseError.new 'Invalid JSON string' end end |