Skip to content

Fix invalid cast in JsonValueConverter

996f325
Select commit
Loading
Failed to load commit list.
Closed

Fix JsonValueConverter to handle array and object values in Dictionary<string, JsonValue> #115829

Fix invalid cast in JsonValueConverter
996f325
Select commit
Loading
Failed to load commit list.
Azure Pipelines / dotnet-linker-tests (Build windows-x64 release Runtime_Release) failed May 22, 2025 in 28m 22s

Build windows-x64 release Runtime_Release failed

Annotations

Check failure on line 34 in src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dotnet-linker-tests (Build windows-x64 release Runtime_Release)

src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs#L34

src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs(34,24): error CS0039: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert type 'System.Text.Json.Nodes.JsonObject' to 'System.Text.Json.Nodes.JsonValue' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion

Check failure on line 39 in src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dotnet-linker-tests (Build windows-x64 release Runtime_Release)

src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs#L39

src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs(39,24): error CS0039: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert type 'System.Text.Json.Nodes.JsonArray' to 'System.Text.Json.Nodes.JsonValue' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion

Check failure on line 36 in src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dotnet-linker-tests (Build windows-x64 release Runtime_Release)

src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs#L36

src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs(36,1): error SA1028: (NETCORE_ENGINEERING_TELEMETRY=Build) Code should not contain trailing whitespace (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1028.md)