class_docstr: JSON record parser
class_docstr_tok: ["JSON","record","parser"]
docstr: Extract records from the original json payload using the JSON configuration
  
  If the embedded_json flag is set, this will additionally attempt to load the
  extracted data as json into another dictionary object.
  
  Args:
      json_payload (dict): The parsed json data
  
  Returns:
      list: A list of one or more JSON records extracted via JSON path
docstr_tok: ["Extract","records","from","the","original","json","payload","using","the","JSON","configuration","If","the","embedded_json","flag","is","set",",","this","will","additionally","attempt","to","load","the","extracted","data","as","json","into","another","dictionary","object",".","Args",":","json_payload","(","dict",")",":","The","parsed","json","data","Returns",":","list",":","A","list","of","one","or","more","JSON","records","extracted","via","JSON","path"]
code: def _extract_via_json_path(self, json_payload):
      """Extract records from the original json payload using the JSON configuration
  
      If the embedded_json flag is set, this will additionally attempt to load the
      extracted data as json into another dictionary object.
  
      Args:
          json_payload (dict): The parsed json data
  
      Returns:
          list: A list of one or more JSON records extracted via JSON path
      """
      extracted_records = self._json_path_records(json_payload)
      if not extracted_records:
          return False
  
      if not self.embedded_json:
          return [(rec, True) for rec in extracted_records]
  
      embedded_records = []
      for record in extracted_records:
          valid = True
          try:
              record = json.loads(record)
              if not isinstance(record, dict):
                  # purposely raising here to be caught below & handled
                  raise TypeError("record data is not a dictionary")
          except (ValueError, TypeError) as err:
              LOGGER.debug("Embedded json is invalid: %s", str(err))
              valid = False
  
          embedded_records.append((record, valid))
  
      return embedded_records
  
imports: from abc import ABCMeta, abstractmethod
  from copy import deepcopy
  import csv
  from fnmatch import fnmatch
  import json
  import logging
  import re
  import io
  import jmespath
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 3 for calling the JSONParser obj's underlying member method code with example usage: obj._extract_via_json_path(json_payload) and returns: embedded_records, False, unknown