v6.2.0
tanchongmin/strictjsonv6.2.0Nov 7, 2025by tanchongmin
AI Summary
This release enhances parse_yaml with improved robustness through regex for special characters and better validation of list/dict formats. It also adds support for Union type syntax using | and introduces image parsing decorators for OpenAI-compatible model providers.
Key Highlights
- Added support for parse_yaml in pydantic v2.12.4
- Made parse_yaml more robust using regex for keys with special characters and double colons
- Improved validation for list[] (single datatype) and dict[] (exactly two datatypes)
- Added support for | syntax in type hinting (int | str -> Union, int | None -> Optional)
- Created image_parser and image_parser_async decorators for OpenAI API-compatible providers
New Features
- pydantic v2.12.4 support for parse_yaml
- Regex-based parsing for special characters and double colons
- Strict list[] and dict[] format validation
- Union type syntax support using | operator
- image_parser decorator for synchronous image parsing
- image_parser_async decorator for asynchronous image parsing
Full Release Notes
Added support for parse_yaml for pydantic v2.12.4 Made parse_yaml more robust using regex to solve keys with special characters and lines with double colons Better catching of non-working format for list[] and dict[]. list[] must now contain only one datatype, and dict[] must contain exactly two datatypes Allows | for datatyping: int | str -> Union[int, str], int | None -> Optional[int] Created image_parser and image_parser_async decorators to parse images for model providers capable of using OpenAI API interface (such as OpenRouter)