Simplify.Web.Json 2.2.5

.NET 5.0 .NET Core 3.1 .NET Standard 2.0 .NET Framework 4.6.2
dotnet add package Simplify.Web.Json --version 2.2.5
NuGet\Install-Package Simplify.Web.Json -Version 2.2.5
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="Simplify.Web.Json" Version="2.2.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Simplify.Web.Json --version 2.2.5
#r "nuget: Simplify.Web.Json, 2.2.5"
#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 Simplify.Web.Json as a Cake Addin
#addin nuget:?package=Simplify.Web.Json&version=2.2.5

// Install Simplify.Web.Json as a Cake Tool
#tool nuget:?package=Simplify.Web.Json&version=2.2.5

Simplify.Web.Json

Nuget Version Nuget Download Build PackageLibraries.io dependency status for latest release CodeFactor Grade Platform PRs Welcome

Simplify.Web.Json is a package which provides JSON serialization/deserialization for Simplify.Web web-framework controllers.

Quick Start

Sending JSON to client

If the controller returns Json response class object, then the Framework execution will be stopped, object will be parsed to JSON string and sent to client

public class MyController : Controller
{
    public override ControllerResponse Invoke()
    {
        ...
        return new Json(myObj);
    }
}

Getting JSON from client

Registering binder
public void Configuration(IApplicationBuilder app)
{
    ...
    HttpModelHandler.RegisterModelBinder<JsonModelBinder>();

    app.UseSimplifyWeb();
}

public void ConfigureServices(IServiceCollection services)
{
    ...
    DIContainer.Current.RegisterJsonModelBinder();
    ...
}
Accessing model
Asynchronous
public class MyController : ControllerAsync<MyModel>
{
    public override async Task<ControllerResponse> Invoke()
    {
        await ReadModelAsync();

        Model.
    }
}
Synchronous

JSON string will be deserialized to the controller model on first model access

public class MyController : Controller<MyModel>
{
    public override ControllerResponse Invoke()
    {
        Model.
    }
}
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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
2.2.5 69 3/11/2023
2.2.4 212 11/30/2022
2.2.3 441 5/18/2022
2.2.2 5,405 11/24/2021
2.2.1 442 4/26/2021
2.2.0 379 3/23/2021
2.1.3 363 2/28/2021
2.1.2 467 10/26/2020
2.1.1 526 4/29/2020
2.1.0 497 1/30/2020
2.0.1 465 1/27/2020
2.0.0 528 12/22/2019
2.0.0-pre02 343 12/17/2019
2.0.0-pre01 260 8/24/2019
1.4.0 540 10/21/2019
1.3.0 476 10/20/2019
1.2.4 521 9/28/2019
1.2.3 488 9/3/2019
1.2.2 501 8/25/2019
1.2.1 486 8/22/2019
1.2.0 703 1/3/2019
1.1.3 918 5/9/2018
1.1.2 879 8/23/2017
1.1.1 1,182 11/4/2016
1.1.0 877 10/7/2016
1.0.0 885 8/26/2016
0.9.0 892 8/23/2016