Toggle Menu
Prev Up Next

# `langchain_core.utils.json`.parse_and_check_json_markdown

langchain_core.utils.json.parse_and_check_json_markdown(text: str, expected_keys: List[str]) → dict

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

  Parameters

    - text (str) – The Markdown string.

    - expected_keys (List[str]) – The expected keys in the JSON string.

  Returns

    The parsed JSON object as a Python dictionary.

  Return type

    dict