Neuroglia.Data.Expressions.JQ 4.18.1

Prefix Reserved
dotnet add package Neuroglia.Data.Expressions.JQ --version 4.18.1                
NuGet\Install-Package Neuroglia.Data.Expressions.JQ -Version 4.18.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="Neuroglia.Data.Expressions.JQ" Version="4.18.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Neuroglia.Data.Expressions.JQ --version 4.18.1                
#r "nuget: Neuroglia.Data.Expressions.JQ, 4.18.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 Neuroglia.Data.Expressions.JQ as a Cake Addin
#addin nuget:?package=Neuroglia.Data.Expressions.JQ&version=4.18.1

// Install Neuroglia.Data.Expressions.JQ as a Cake Tool
#tool nuget:?package=Neuroglia.Data.Expressions.JQ&version=4.18.1                

Neuroglia.Data.Expressions.JQ

A .NET package to evaluate expressions using jq. This library integrates jq with .NET applications, making it simple to work with JSON data transformations and expressions.

Getting Started

Installation

  1. Add the package to your .NET project:
dotnet add package Neuroglia.Data.Expressions.JQ
  1. Ensure jq is installed:
apt-get update
apt-get install jq -y

For other systems, refer to the official jq installation guide.


Configuration

Optionally, configure the JQ Expression Evaluator in your application's Dependency Injection (DI) container:

services.AddJQExpressionEvaluator(options => 
{
    options.UseSerializer<MyJsonSerializerImplementation>(); // Optional: Defaults to the first registered `IJsonSerializer`
}, ServiceLifetime.Singleton);

Usage

After setup, you can start using the evaluator to process expressions.

Example Code
var defaultEvaluator = serviceProvider.GetRequiredService<IExpressionEvaluator>();
var explicitEvaluator = serviceProvider.GetRequiredService<IExpressionEvaluatorProvider>().GetEvaluator("jq");

var expression = "{ \"foo\": .foo, \"bar\": $param1.bar }";
var input = new
{
    foo = "bar"
};
var arguments = new Dictionary<string, object>()
{
    { 
        "param1", 
        new
        {
            bar = "baz"
        } 
    }
};

var result = await defaultEvaluator.EvaluateAsync(expression, input, arguments, typeof(MyResult));

public class MyResult
{
    public string Foo { get; set; }
    public string Bar { get; set; }
}

Features

  • Easily integrate the jq tool with .NET applications.
  • Support for Dependency Injection with customizable options.
  • Strongly-typed evaluation for JSON transformation.
  • Flexible serialization options.

Requirements

  • .NET Version: Compatible with .NET 9+.
  • jq: Ensure jq is installed on your system.

Contributing

Feel free to contribute to this project! Please submit issues, feature requests, or pull requests on the GitHub repository.


License

This project is licensed under the Apache 2.0 license.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Neuroglia.Data.Expressions.JQ:

Package Downloads
CloudStreams.Core.Api

Package Description

CloudStreams.Gateway.Api

Package Description

CloudStreams.Broker.Api

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Neuroglia.Data.Expressions.JQ:

Repository Stars
serverlessworkflow/synapse
Serverless Workflow Management System (WFMS)
Version Downloads Last updated
4.18.1 213 12/10/2024
4.18.0 116 12/10/2024
4.16.2 190 11/20/2024
4.16.1 88 11/18/2024
4.16.0 144 11/14/2024
4.15.9 87 11/14/2024
4.15.8 561 10/11/2024
4.15.7 92 10/9/2024
4.15.6 463 9/10/2024
4.15.5 122 9/10/2024
4.15.4 250 9/8/2024
4.15.3 207 9/2/2024
4.15.2 119 8/30/2024
4.15.1 119 8/26/2024
4.15.0 426 8/26/2024
4.14.1 200 8/21/2024
4.14.0 151 8/16/2024
4.13.0 128 8/16/2024
4.12.10 138 8/14/2024
4.12.9 139 8/14/2024
4.12.8 132 8/12/2024
4.12.7 137 8/8/2024
4.12.6 77 7/25/2024
4.12.5 124 7/9/2024
4.12.4 106 7/9/2024
4.12.3 117 7/8/2024
4.12.2 130 6/26/2024
4.12.1 167 6/18/2024
4.12.0 116 6/17/2024
4.11.3 114 6/13/2024
4.11.2 106 6/12/2024
4.11.1 117 6/7/2024
4.11.0 118 5/31/2024
4.10.0 117 5/30/2024
4.9.15 136 5/20/2024
4.9.14 122 5/15/2024
4.9.13 105 5/12/2024
4.9.12 96 5/11/2024
4.9.11 104 5/8/2024
4.9.10 114 5/7/2024
4.9.9 124 5/6/2024
4.9.8 123 5/6/2024
4.9.7 73 5/2/2024
4.9.6 350 4/15/2024
4.9.5 136 4/10/2024
4.9.4 99 4/10/2024
4.9.3 117 4/10/2024
4.9.2 101 4/10/2024
4.9.1 122 4/10/2024
4.9.0 129 4/9/2024
4.8.5 144 4/4/2024
4.8.4 117 4/3/2024
4.8.3 108 3/25/2024
4.8.2 118 3/22/2024
4.8.1 97 3/18/2024
4.8.0 122 3/18/2024
4.7.7 230 12/8/2023
4.7.6 138 12/6/2023
4.7.5 151 12/5/2023
4.7.4 147 12/5/2023
4.7.3 141 12/4/2023
4.7.2 147 12/4/2023
4.7.1 152 12/1/2023
4.7.0 132 11/28/2023
4.6.1 118 11/27/2023
4.6.0 158 11/25/2023
4.5.2 133 11/25/2023
4.5.1 153 11/23/2023
4.5.0 141 11/23/2023
4.4.2 143 11/22/2023
4.4.1 128 11/21/2023
4.4.0 159 11/21/2023
4.3.3 139 11/20/2023
4.3.2 112 11/20/2023
4.3.1 137 11/20/2023
4.3.0 122 11/20/2023
4.2.1 140 11/17/2023
4.2.0 139 11/17/2023
4.1.0 134 11/17/2023
4.0.0 135 11/15/2023
3.10.0 120 11/15/2023
3.9.0 137 11/15/2023
3.8.4 134 11/10/2023
3.8.3 144 11/10/2023
3.8.2 114 11/10/2023
3.8.1 134 11/10/2023
3.8.0 128 11/9/2023
3.7.0 131 11/8/2023
3.6.1 126 11/8/2023
3.6.0 116 11/7/2023
3.5.2 144 11/6/2023
3.5.1 134 11/3/2023
3.5.0 126 11/3/2023
3.4.0 155 10/25/2023
3.3.0 144 10/23/2023
3.2.0 139 10/19/2023
3.1.1 148 10/18/2023
3.1.0 161 10/18/2023
3.0.1 148 10/16/2023
2.1.4 1,005 7/14/2023
2.1.3 214 6/22/2023
2.1.2 420 5/31/2023
2.1.1 426 5/25/2023
2.1.0 299 4/4/2023
2.0.12 1,937 11/21/2022
2.0.11 372 11/21/2022
2.0.10 431 11/17/2022
2.0.9 469 11/14/2022
2.0.8 558 11/14/2022
2.0.7 583 11/7/2022
2.0.6 626 11/2/2022
2.0.5 545 10/27/2022
2.0.4 491 10/27/2022
2.0.3 765 10/3/2022
2.0.2 529 9/28/2022
2.0.1.88 603 9/23/2022
2.0.1.87 531 9/23/2022
2.0.1.86 509 9/20/2022
2.0.1.85 525 9/20/2022
2.0.1.84 521 9/19/2022
2.0.1.83 484 9/19/2022
2.0.1.82 642 9/9/2022
2.0.1.81 499 9/9/2022
2.0.1.80 485 9/9/2022
2.0.1.79 525 9/8/2022
2.0.1.78 515 9/7/2022
2.0.1.77 495 9/7/2022
2.0.1.76 476 9/7/2022
2.0.1.75 526 9/5/2022
2.0.1.74 496 9/5/2022
2.0.1.73 578 9/2/2022
2.0.1.72 525 9/1/2022
2.0.1.71 661 8/24/2022
2.0.1.70 676 8/23/2022
2.0.1.69 628 8/16/2022
2.0.1.68 633 8/10/2022
2.0.1.67 1,051 6/28/2022
2.0.1.66 562 6/17/2022
2.0.1.65 517 5/25/2022
2.0.1.64 515 5/25/2022
2.0.1.63 769 5/19/2022
2.0.1.62 666 5/11/2022
2.0.1.61 512 5/2/2022
2.0.1.60 508 4/28/2022
2.0.1.59 700 4/21/2022
2.0.1.58 540 4/18/2022
2.0.1.57 788 3/31/2022
2.0.1.56 508 3/31/2022
2.0.1.55 511 3/31/2022
2.0.1.54 506 3/29/2022
2.0.1.53 502 3/29/2022
2.0.1.52 534 3/20/2022
2.0.1.51 508 3/20/2022
2.0.1.50 514 3/20/2022
2.0.1.49 523 3/20/2022
2.0.1.48 515 3/19/2022
2.0.1.47 486 3/19/2022
2.0.1.46 487 3/19/2022
2.0.1.45 552 3/15/2022
2.0.1.44 525 3/14/2022
2.0.1.43 492 3/14/2022
2.0.1.42 507 3/10/2022
2.0.1.41 507 3/10/2022
2.0.1.40 492 3/9/2022
2.0.1.39 521 3/8/2022
2.0.1.38 504 3/8/2022
2.0.1.37 532 3/4/2022
2.0.1.36 492 3/4/2022
2.0.1.35 493 3/4/2022
2.0.1.34 522 3/3/2022
2.0.1.33 504 3/2/2022
2.0.1.32 526 2/25/2022
2.0.1.31 521 2/24/2022
2.0.1.30 507 2/23/2022
2.0.1.29 509 2/23/2022
2.0.1.28 529 2/23/2022
2.0.1.27 512 2/22/2022
2.0.1.26 516 2/12/2022
2.0.1.25 515 2/7/2022
2.0.1.24 574 2/4/2022
2.0.1.23 566 1/28/2022
2.0.1.22 528 1/28/2022
2.0.1.21 514 1/26/2022
2.0.1.20 506 1/25/2022
2.0.1.19 505 1/24/2022
2.0.1.18 525 1/23/2022
2.0.1.17 527 1/19/2022
2.0.1.16 368 12/20/2021
2.0.1.15 347 12/16/2021
2.0.1.14 535 12/9/2021
2.0.1.13 559 12/9/2021
2.0.1.12 374 12/9/2021
2.0.1.11 370 12/8/2021
2.0.1.10 345 12/7/2021
2.0.1.9 352 12/7/2021
2.0.1.8 363 12/7/2021
2.0.1.7 376 12/7/2021
2.0.1.6 362 12/7/2021
2.0.1.5 615 12/6/2021
2.0.1.4 895 12/3/2021
2.0.1.3 351 12/2/2021
2.0.1.2 342 12/2/2021
2.0.1.1 1,838 11/26/2021
2.0.1 6,014 11/24/2021