IvanJosipovic / JsonPathLINQ

JsonPath to LINQ Expressions

Repository from Github https://github.comIvanJosipovic/JsonPathLINQRepository from Github https://github.comIvanJosipovic/JsonPathLINQ

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

License:MIT License


Languages

Language:C# 100.0%