langchain.output_parsers.json.parse_and_check_json_markdown¶

langchain.output_parsers.json.parse_and_check_json_markdown(text: str, expected_keys: List[str]) dict[source]¶

Parse a JSON string from a Markdown string and check that it contains the expected keys.

Parameters
  • text – The Markdown string.

  • expected_keys – The expected keys in the JSON string.

Returns

The parsed JSON object as a Python dictionary.