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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotNetThoughts.Results.Json" Version="1.5.11" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetThoughts.Results.Json --version 1.5.11                
#r "nuget: DotNetThoughts.Results.Json, 1.5.11"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.11 39 1/18/2025
1.5.7 1,434 6/9/2024