From 1036b7e33a4360df8b99f81ef03492fee8328bd0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Jun 2026 01:30:42 +0900 Subject: refactor(json): replace seld/jsonlint with serde_json Validate JSON syntax with serde_json's parse errors in JsonFile, and detect duplicate keys in ConfigValidator with a hand-written serde visitor, dropping the now-unused JsonParser/Lexer/DuplicateKeyException ports. ParsingException is kept as the thrown error type and downcast signal. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/seld/json_lint/duplicate_key_exception.rs | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs (limited to 'crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs') diff --git a/crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs b/crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs deleted file mode 100644 index 17e6a90..0000000 --- a/crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs +++ /dev/null @@ -1,25 +0,0 @@ -//! ref: composer/vendor/seld/jsonlint/src/Seld/JsonLint/DuplicateKeyException.php - -use indexmap::IndexMap; -use shirabe_php_shim::PhpMixed; - -#[derive(Debug)] -pub struct DuplicateKeyException { - pub message: String, - pub code: i64, - pub details: IndexMap, -} - -impl DuplicateKeyException { - pub fn get_details(&self) -> &IndexMap { - &self.details - } -} - -impl std::fmt::Display for DuplicateKeyException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.message) - } -} - -impl std::error::Error for DuplicateKeyException {} -- cgit v1.3.1