Skip to content

Update print statement to use model_dump_json#2296

Merged
Lauren Hirata Singh (lnhsingh) merged 2 commits into
langchain-ai:mainfrom
rb-one:patch-1
Jan 22, 2026
Merged

Update print statement to use model_dump_json#2296
Lauren Hirata Singh (lnhsingh) merged 2 commits into
langchain-ai:mainfrom
rb-one:patch-1

Conversation

@rb-one

Copy link
Copy Markdown
Contributor

Overview

Update documentation: 'The json method is deprecated; the documentation encourage you to use model_dump_json, the current example is broken

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed

'The `json` method is deprecated; the documentation encourage you to use `model_dump_json`, the current example is broken
Copilot AI review requested due to automatic review settings January 20, 2026 23:01
@github-actions github-actions Bot added langsmith For docs changes to LangSmith external User is not a member of langchain-ai labels Jan 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates a Python code example to use the current Pydantic API method model_dump_json() instead of the deprecated .json() method, fixing a broken code example in the documentation.

Changes:

  • Updated the print statement in the experiment metrics example to use model_dump_json() instead of the deprecated .json() method

@lnhsingh
Lauren Hirata Singh (lnhsingh) merged commit 5a5b526 into langchain-ai:main Jan 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai langsmith For docs changes to LangSmith

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants