Home / Function/ _parse_json() — langchain Function Reference

_parse_json() — langchain Function Reference

Architecture documentation for the _parse_json() function in json_distance.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ee287886_d81c_e9e6_156a_557c97ddb4b1["_parse_json()"]
  481593b0_ea9f_1093_bbdc_d3bd06c33d40["JsonEditDistanceEvaluator"]
  ee287886_d81c_e9e6_156a_557c97ddb4b1 -->|defined in| 481593b0_ea9f_1093_bbdc_d3bd06c33d40
  e77d63b1_8ba5_e39d_d541_78866bbc0b02["_evaluate_strings()"]
  e77d63b1_8ba5_e39d_d541_78866bbc0b02 -->|calls| ee287886_d81c_e9e6_156a_557c97ddb4b1
  style ee287886_d81c_e9e6_156a_557c97ddb4b1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/parsing/json_distance.py lines 94–97

    def _parse_json(self, node: Any) -> dict | list | None | float | bool | int | str:
        if isinstance(node, str):
            return parse_json_markdown(node)
        return node

Domain

Subdomains

Frequently Asked Questions

What does _parse_json() do?
_parse_json() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/parsing/json_distance.py.
Where is _parse_json() defined?
_parse_json() is defined in libs/langchain/langchain_classic/evaluation/parsing/json_distance.py at line 94.
What calls _parse_json()?
_parse_json() is called by 1 function(s): _evaluate_strings.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free