LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coreloaddumpdumps
    Functionā—Since v0.1

    dumps

    Copy
    dumps(
      obj: Any,
      *,
      pretty: bool = False,
      **kwargs: Any 
    View source on GitHub
    =
    {
    }
    )
    ->
    str

    Parameters

    NameTypeDescription
    obj*Any
    prettybool
    Default:False
    **kwargsAny
    Default:{}

    Return a JSON string representation of an object.

    Note:

    Plain dicts containing an 'lc' key are automatically escaped to prevent confusion with LC serialization format. The escape marker is removed during deserialization.

    The object to dump.

    Whether to pretty print the json.

    If True, the json will be indented by either 2 spaces or the amount provided in the indent kwarg.

    Additional arguments to pass to json.dumps