diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-29 01:30:42 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-29 01:31:37 +0900 |
| commit | 1036b7e33a4360df8b99f81ef03492fee8328bd0 (patch) | |
| tree | d963d6f83674884dabbd20fd60c5c8f75c661347 /crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs | |
| parent | 9be0f98f71fe8071ab839ac1036b4064ac3172b4 (diff) | |
| download | php-shirabe-1036b7e33a4360df8b99f81ef03492fee8328bd0.tar.gz php-shirabe-1036b7e33a4360df8b99f81ef03492fee8328bd0.tar.zst php-shirabe-1036b7e33a4360df8b99f81ef03492fee8328bd0.zip | |
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/seld/json_lint/duplicate_key_exception.rs | 25 |
1 files changed, 0 insertions, 25 deletions
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<String, PhpMixed>, -} - -impl DuplicateKeyException { - pub fn get_details(&self) -> &IndexMap<String, PhpMixed> { - &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 {} |
