Skip to content

Add TOON (Token Oriented Object Notation) support #34059

@vzan2012

Description

@vzan2012

Checked other resources

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-cli
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-perplexity
  • langchain-prompty
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Feature Description

I would like LangChain to support TOON (Token Oriented Object Notation).

This feature would allow users to work with structured, token-based data more easily, especially during streaming.
It would also help reduce parsing issues and make workflows smoother overall.

It would be more helpful in adding TOON features into langchain.

I was able to find some TOON library with documentation:
https://github.com/toon-format/toon

Please refer to the documentation.

I would like to hear feedback from the team

Use Case

I’m trying to build an application that needs to handle structured data from LLMs in a more reliable way, especially when working with streaming outputs.
Currently, I have to work around this by manually parsing model responses, which is fragile and often breaks when the output formatting changes.
This feature would help me and other users by providing a consistent, token-based format (TOON) that makes it easier to read, parse, and process structured data without extra hacks.

Proposed Solution

No response

Alternatives Considered

I have not yet tried this solution but was able to find a reference library of implementation

https://github.com/toon-format/toon

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions