Home / Function/ _json_size() — langchain Function Reference

_json_size() — langchain Function Reference

Architecture documentation for the _json_size() function in json.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  94b9fce8_9d5d_edc5_43e5_d5f5c75c727e["_json_size()"]
  6fcdab9c_3ecd_51f0_a2ae_3b0c8bfac048["RecursiveJsonSplitter"]
  94b9fce8_9d5d_edc5_43e5_d5f5c75c727e -->|defined in| 6fcdab9c_3ecd_51f0_a2ae_3b0c8bfac048
  94b9fce8_9d5d_edc5_43e5_d5f5c75c727e["_json_size()"]
  94b9fce8_9d5d_edc5_43e5_d5f5c75c727e -->|calls| 94b9fce8_9d5d_edc5_43e5_d5f5c75c727e
  d81ccdd5_8091_6de6_425e_3dba9ac5dc9f["_json_split()"]
  d81ccdd5_8091_6de6_425e_3dba9ac5dc9f -->|calls| 94b9fce8_9d5d_edc5_43e5_d5f5c75c727e
  94b9fce8_9d5d_edc5_43e5_d5f5c75c727e["_json_size()"]
  94b9fce8_9d5d_edc5_43e5_d5f5c75c727e -->|calls| 94b9fce8_9d5d_edc5_43e5_d5f5c75c727e
  style 94b9fce8_9d5d_edc5_43e5_d5f5c75c727e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/text-splitters/langchain_text_splitters/json.py lines 54–56

    def _json_size(data: dict[str, Any]) -> int:
        """Calculate the size of the serialized JSON object."""
        return len(json.dumps(data))

Subdomains

Calls

Frequently Asked Questions

What does _json_size() do?
_json_size() is a function in the langchain codebase, defined in libs/text-splitters/langchain_text_splitters/json.py.
Where is _json_size() defined?
_json_size() is defined in libs/text-splitters/langchain_text_splitters/json.py at line 54.
What does _json_size() call?
_json_size() calls 1 function(s): _json_size.
What calls _json_size()?
_json_size() is called by 2 function(s): _json_size, _json_split.

Analyze Your Own Codebase

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

Try Supermodel Free