diff options
Diffstat (limited to 'crates/shirabe/src/command/search_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/search_command.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/search_command.rs b/crates/shirabe/src/command/search_command.rs index 1cd8e59..b9eacf5 100644 --- a/crates/shirabe/src/command/search_command.rs +++ b/crates/shirabe/src/command/search_command.rs @@ -199,7 +199,10 @@ impl SearchCommand { } } } else if format == "json" { - // TODO(phase-b): JsonFile::encode takes &PhpMixed; convert Vec<SearchResult> into PhpMixed + // TODO(phase-c): faithful JSON output requires SearchResult to retain the raw result + // array. PHP's fulltext search passes through arbitrary API fields (downloads, favers, + // repository, ...) which the typed SearchResult (name/description/abandoned/url) drops, + // so encoding it here would diverge from Composer's output. let _ = &results; io.write(&JsonFile::encode(&PhpMixed::Null)); } |
