DotNetThoughts.Results.Json
1.5.11
dotnet add package DotNetThoughts.Results.Json --version 1.5.11
NuGet\Install-Package DotNetThoughts.Results.Json -Version 1.5.11
<PackageReference Include="DotNetThoughts.Results.Json" Version="1.5.11" />
paket add DotNetThoughts.Results.Json --version 1.5.11
#r "nuget: DotNetThoughts.Results.Json, 1.5.11"
// Install DotNetThoughts.Results.Json as a Cake Addin #addin nuget:?package=DotNetThoughts.Results.Json&version=1.5.11 // Install DotNetThoughts.Results.Json as a Cake Tool #tool nuget:?package=DotNetThoughts.Results.Json&version=1.5.11
Results.Json
Package contains code to help serialize and deserialize Result objects to and from JSON.
JsonConverterFactoryForResultOfT
is a JsonConverterFactory
that can create JsonConverter
objects for any Result<T>
object.
Remember, a Result representing one or more Errors contains a list of objects implementing the IError
interface.
The actual type of an Error object is not included when serialized. This means, that when deserializing that Error again, it can't be deserialized to its original type.
Instead, the Error object is deserialized to a generic DeserializedError
object.
A serialized Successful Result<T>
will look like this:
{
"Success": true,
"Value": "Some value"
}
A serialized Successful Result<Unit>
will look like this:
{
"Success": true
}
A serialized Error Result<T>
or Result<Unit>
will look like this:
{
"Success": false,
"Errors": [
{
"Type": "MyError",
"Message": "Some error message"
"Data": {
"Key": "value",
}
}
]
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- DotNetThoughts.Results (>= 1.5.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.