Skip to content

IvanJosipovic/JsonPathLINQ

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

About

JsonPath to LINQ Expressions

Resources

License

Stars

Watchers

Forks

Contributors

Languages