class Krikri::JsonParser

JsonParser @see Krikri::Parser

Public Class Methods

new(record, root_path = '$') click to toggle source

@param record [Krikri::OriginalRecord] a record whose properties can be parsed by the parser instance. @param root_path [String] JsonPath that identifies the root path for the desired parse root. @see goessner.net/articles/JsonPath/ JsonPath

Calls superclass method Krikri::Parser::new
# 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