JsonPathToModel 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package JsonPathToModel --version 1.0.1                
NuGet\Install-Package JsonPathToModel -Version 1.0.1                
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="JsonPathToModel" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JsonPathToModel --version 1.0.1                
#r "nuget: JsonPathToModel, 1.0.1"                
#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 JsonPathToModel as a Cake Addin
#addin nuget:?package=JsonPathToModel&version=1.0.1

// Install JsonPathToModel as a Cake Tool
#tool nuget:?package=JsonPathToModel&version=1.0.1                

JsonPathToModel

Use JsonPath to navigate through .NET in memory models

Usage:

var model = new SampleModel
{
    Id = "7",
    Name = "Gerry",
    Nested = new([new SampleNested { Id = "xyz", Name = "Pedro" }])
};

var navi = new JsonPathModelNavigator();

var resultSingle = navi.GetValue(model, "$.Id");
navi.GetValue(model, "$.Nested[0].Name");

var resultValues = navi.SelectValues(model, "$.Nested[*].Id");
navi.SelectValues(model, "$.Nested[*].Name");

var result = navi.SetValue(model, "$.Nested[0].Name", "Abdula");

Model:

public class SampleModel
{
    public string Id { get; set; } 
    public string Name { get; set; }
    public List<SampleNested> Nested { get; set; } = [];
}

public class SampleNested
{
    public string Id { get; set; }
    public string Name { get; set; }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on JsonPathToModel:

Package Downloads
MicroFlows

Use MicroFlows to implement Stateful workflows for microservices

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.6.1 594 10/14/2024
1.6.0 121 9/21/2024
1.5.7 145 9/16/2024 1.5.7 is deprecated because it has critical bugs.
1.5.6 427 9/16/2024
1.5.5 125 9/14/2024
1.5.4 98 9/14/2024
1.5.3 168 9/13/2024
1.5.2 99 9/13/2024
1.5.1 103 9/13/2024
1.5.0 107 9/13/2024
1.4.0 174 9/9/2024
1.3.2 208 9/6/2024
1.3.1 227 9/2/2024
1.3.0 103 9/2/2024
1.2.6 100 8/29/2024
1.2.5 107 8/29/2024
1.2.4 105 8/27/2024
1.2.3 95 8/27/2024
1.2.2 105 8/26/2024
1.2.1 100 8/26/2024
1.2.0 148 8/25/2024 1.2.0 is deprecated because it has critical bugs.
1.1.0 110 8/20/2024
1.0.1 129 8/19/2024
1.0.0 131 8/19/2024