Class: Krikri::JsonParser
- Defined in:
- lib/krikri/parsers/json_parser.rb
Overview
JsonParser
Defined Under Namespace
Classes: Value
Instance Attribute Summary
Attributes inherited from Parser
Instance Method Summary collapse
-
#initialize(record, root_path = '$') ⇒ JsonParser
constructor
be parsed by the parser instance.
Methods inherited from Parser
Constructor Details
#initialize(record, root_path = '$') ⇒ JsonParser
be parsed by the parser instance. the desired parse root.
14 15 16 17 |
# File 'lib/krikri/parsers/json_parser.rb', line 14 def initialize(record, root_path = '$') @root = Value.new(JsonPath.on(record.content, root_path).first) super(record) end |