class_docstr: Test class for JSONParser
class_docstr_tok: ["Test","class","for","JSONParser"]
docstr: JSONParser - Embedded JSON
docstr_tok: ["JSONParser","-","Embedded","JSON"]
code: def test_embedded_json(self):
      """JSONParser - Embedded JSON"""
      options = {
          "schema": {
              "nested_key_01": "string",
              "nested_key_02": "string",
          },
          "configuration": {
              "embedded_json": True,
              "envelope_keys": {
                  "env_key_01": "string",
                  "env_key_02": "string",
              },
              "json_path": "test_list[*].message",
          },
      }
  
      record_data = json.dumps(
          {
              "env_key_01": "data",
              "env_key_02": "time",
              "test_list": [
                  {
                      "id": "foo",
                      "message": json.dumps(
                          {
                              "nested_key_01": "bar",
                              "nested_key_02": "baz",
                          }
                      ),
                  }
              ],
          }
      )
  
      # get parsed data
      parser = JSONParser(options)
      assert_equal(parser.parse(record_data), True)
  
      expected_result = [
          {
              "nested_key_01": "bar",
              "nested_key_02": "baz",
              "streamalert:envelope_keys": {
                  "env_key_01": "data",
                  "env_key_02": "time",
              },
          }
      ]
  
      assert_equal(parser.parsed_records, expected_result)
  
imports: import json
  from mock import patch
  from nose.tools import assert_equal
  from streamalert.classifier.parsers import JSONParser
label_desc: Use image node_id 15 for calling the TestJSONParser obj's underlying member method code with example usage: obj.test_embedded_json() without return types