Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.04 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.04 KB

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 (==)