Skip to content

Commit 32c05fb

Browse files
authored
Migrate LinuxScanner from Newtonsoft.Json to System.Text.Json (#1567)
- `LinuxScanner`: - Replace `JsonConvert.SerializeObject` with `JsonSerializer.Serialize` - Replace `JsonConvert.DeserializeObject` with `SyftOutput.FromJson()` - Remove `Newtonsoft.Json` using directive - `SyftOutput`: - Regenerate from JSON schema using quicktype.io with `System.Text.Json` - Add `[JsonPropertyName]` attributes for proper property mapping - Add `[JsonIgnore]` attributes for null value handling - Add `FromJson()` helper method with case-insensitive parsing - Enable nullable reference types with appropriate pragmas - `LinuxScannerTests`: - Convert test JSON strings from escaped C# strings to raw literals - Fix property name casing to match schema (`versionID` vs `versionId`) - Remove trailing commas that were previously tolerated See #231
1 parent 9cf0b1d commit 32c05fb

File tree

3 files changed

+3474
-285
lines changed

3 files changed

+3474
-285
lines changed

0 commit comments

Comments
 (0)