Skip to content

IvanJosipovic/JsonPathLINQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsonPathLINQ

JsonPath to LINQ Expressions

Nuget Nuget) codecov

What is this?

This project allows generating LINQ Expression from JsonPath queries.

How to install?

Install-Package JsonPathLINQ

How to use?

private class TestObject
{
   public string stringValue { get; set; }
}

var exp = JsonPathLINQ.JsonPathLINQ.GetExpression<TestObject>(".stringValue");
var compiled = exp.Compile();

var result = compiled.Invoke(new TestObject());

Supported Operations

  • Property Access
    • Examples
      • ".property"
      • ".property.subProperty"
  • Filter
    • Examples
      • ".list[?(@.Type=="1")].Status"
    • Operators
      • Equals (==)