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[source]

从Markdown字符串中解析JSON字符串,并检查它是否包含预期的键。

参数:

text: Markdown字符串。 expected_keys: JSON字符串中预期的键。

返回:

解析后的JSON对象,作为Python字典。

Parameters
  • text (str) –

  • expected_keys (List[str]) –

Return type

dict