jsonschema_diff.pypi_interface¶
Thin wrapper that exposes a simpler, Pandas-free API for PyPI users.
It delegates heavy lifting to jsonschema_diff.core.Property
and
applies optional ANSI-color highlighting.
Classes¶
Facade around the low-level diff engine. |
Module Contents¶
- class JsonSchemaDiff(
- config: Config,
- colorize_pipeline: HighlighterPipeline,
- legend_ignore: list[type[Compare]] | None = None,
Facade around the low-level diff engine.
Call sequence¶
compare()
orcompare_from_files()
render()
→ string (kept in last_render_output)legend()
→ legend table (uses last_compare_list)
- colorize_pipeline: HighlighterPipeline[source]¶
- table_maker: LegendRenderer[source]¶
- static fast_pipeline(
- config: Config,
- old_schema: dict | str,
- new_schema: dict | str,
- colorize_pipeline: HighlighterPipeline | None,
One-shot utility: compare old_schema vs new_schema and return
(rendered_text, compare_list)
.Accepted formats: dict or path to JSON file.
- compare( ) JsonSchemaDiff [source]¶
Populate internal
Property
tree and perform comparison.Accepted formats: dict or path to JSON file.
- rich_render() Text [source]¶
Return the diff body ANSI-colored.
Side effects¶
self.last_render_output
– cached rendered text.self.last_compare_list
– list of Compare subclasses encountered.
- render() str [source]¶
Return the diff body ANSI-colored.
Side effects¶
self.last_render_output
– cached rendered text.self.last_compare_list
– list of Compare subclasses encountered.