aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-seld-json-lint/src/lib.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-09 11:20:24 +0900
committernsfisis <nsfisis@gmail.com>2026-08-09 11:20:24 +0900
commita8a4b54b90e6433cf4a25a88a4765243f831ebef (patch)
tree91cceee5d792c6973e7a053a36d60441ce30bf64 /crates/shirabe-seld-json-lint/src/lib.rs
parent6051927c8fa32cfffa102d2a170c5a6cf747a1b9 (diff)
downloadphp-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.tar.gz
php-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.tar.zst
php-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.zip
refactor(seld-json-lint): extract seld/json_lint into the shirabe-seld-json-lint crate
Move `Seld\JsonLint` out of shirabe-external-packages and into its own crate, so the path is `shirabe_seld_json_lint::ParsingException` instead of `shirabe_external_packages::seld::json_lint::ParsingException`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-seld-json-lint/src/lib.rs')
-rw-r--r--crates/shirabe-seld-json-lint/src/lib.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/shirabe-seld-json-lint/src/lib.rs b/crates/shirabe-seld-json-lint/src/lib.rs
new file mode 100644
index 00000000..2165c8f2
--- /dev/null
+++ b/crates/shirabe-seld-json-lint/src/lib.rs
@@ -0,0 +1,15 @@
+//! Partial port of seld/jsonlint.
+//!
+//! The parser, lexer, and duplicate-key exception (`JsonParser`, `Lexer`,
+//! `DuplicateKeyException`) are intentionally not ported: JSON syntax validation now relies on
+//! serde_json, and duplicate-key detection is done with a hand-written serde visitor, so
+//! jsonlint's own parsing machinery is no longer needed.
+//!
+//! `ParsingException` is kept because it is the exception type thrown for invalid JSON and is
+//! matched (via downcast) across the codebase as an error-kind signal; it also carries detail
+//! such as the error line. Porting it keeps both the thrown exception class and the information
+//! it carries unchanged.
+
+pub mod parsing_exception;
+
+pub use parsing_exception::*;