Deserialization failures in Blazor WASM #14707
Labels
area-blazor
Includes: Blazor, Razor Components
feature-blazor-wasm
This issue is related to and / or impacts Blazor WebAssembly
investigate
If you believe you have an issue that affects the security of the platform please do NOT create an issue and instead email your issue details to secure@microsoft.com. Your report may be eligible for our bug bounty but ONLY if it is reported through email.
Describe the bug
Using System.Text.Json to deserialize an object works on SSB and fails on CSB with identical JSON input data.
To Reproduce
Steps to reproduce the behavior:
Failure #1: WASM: System.MissingMethodException: Default constructor not found for type Deserialize_CSB.Client.Pages.ServiceResult`1[[Deserialize_CSB.Client.Pages.Process_DD[], Deserialize-CSB.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
Failure #2: WASM: System.Text.Json.JsonException: The JSON value could not be converted to Deserialize_CSB.Client.Pages.ServiceResult`1+eStatus[Deserialize_CSB.Client.Pages.Process_DD[]]. Path: $.pStatus | LineNumber: 0 | BytePositionInLine: 12.
Index.zip
Expected behavior
I expect CSB and SSB to both deserialize correctly.
Screenshots
n/a
Additional context
C:\Users\ms>dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100\
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
2.1.802 [C:\Program Files\dotnet\sdk]
2.2.402 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
The text was updated successfully, but these errors were encountered: