base
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| JsonDumpError anyenv.json_tools.base Unified exception for all JSON serialization errors. |
||
| JsonLoadError anyenv.json_tools.base Unified exception for all JSON parsing errors. |
||
| JsonProviderBase anyenv.json_tools.base Base class for all JSON providers. |
🛈 DocStrings¶
Base interface for JSON providers.
JsonDumpError
¶
JsonLoadError
¶
Bases: Exception
Unified exception for all JSON parsing errors.
Source code in src/anyenv/json_tools/base.py
source_path
property
¶
Path to the source file that caused the error.
format
¶
Format error with source context for display.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context_lines
|
int
|
Number of lines to show before/after the error line. |
2
|
use_color
|
bool
|
Whether to include ANSI color codes. |
True
|
Source code in src/anyenv/json_tools/base.py
JsonProviderBase
¶
Bases: ABC
Base class for all JSON providers.