Neuroglia.Data.Expressions.JQ 4.19.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Neuroglia.Data.Expressions.JQ --version 4.19.3                
NuGet\Install-Package Neuroglia.Data.Expressions.JQ -Version 4.19.3                
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.19.3" />                
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.19.3                
#r "nuget: Neuroglia.Data.Expressions.JQ, 4.19.3"                
#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.19.3

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

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.19.4 54 2/27/2025
4.19.3 100 2/21/2025
4.19.2 432 2/3/2025
4.19.1 152 1/31/2025
4.19.0 108 1/24/2025
4.18.1 540 12/10/2024
4.18.0 119 12/10/2024
4.16.2 193 11/20/2024
4.16.1 91 11/18/2024
4.16.0 147 11/14/2024
4.15.9 90 11/14/2024
4.15.8 573 10/11/2024
4.15.7 96 10/9/2024
4.15.6 464 9/10/2024
4.15.5 123 9/10/2024
4.15.4 251 9/8/2024
4.15.3 208 9/2/2024
4.15.2 120 8/30/2024
4.15.1 120 8/26/2024
4.15.0 430 8/26/2024
4.14.1 201 8/21/2024
4.14.0 152 8/16/2024
4.13.0 129 8/16/2024
4.12.10 141 8/14/2024
4.12.9 140 8/14/2024
4.12.8 133 8/12/2024
4.12.7 139 8/8/2024
4.12.6 80 7/25/2024
4.12.5 125 7/9/2024
4.12.4 107 7/9/2024
4.12.3 118 7/8/2024
4.12.2 133 6/26/2024
4.12.1 168 6/18/2024
4.12.0 117 6/17/2024
4.11.3 115 6/13/2024
4.11.2 107 6/12/2024
4.11.1 118 6/7/2024
4.11.0 119 5/31/2024
4.10.0 118 5/30/2024
4.9.15 137 5/20/2024
4.9.14 123 5/15/2024
4.9.13 106 5/12/2024
4.9.12 97 5/11/2024
4.9.11 107 5/8/2024
4.9.10 115 5/7/2024
4.9.9 125 5/6/2024
4.9.8 124 5/6/2024
4.9.7 74 5/2/2024
4.9.6 352 4/15/2024
4.9.5 137 4/10/2024
4.9.4 100 4/10/2024
4.9.3 118 4/10/2024
4.9.2 104 4/10/2024
4.9.1 123 4/10/2024
4.9.0 130 4/9/2024
4.8.5 146 4/4/2024
4.8.4 118 4/3/2024
4.8.3 111 3/25/2024
4.8.2 119 3/22/2024
4.8.1 98 3/18/2024
4.8.0 123 3/18/2024
4.7.7 231 12/8/2023
4.7.6 139 12/6/2023
4.7.5 152 12/5/2023
4.7.4 148 12/5/2023
4.7.3 142 12/4/2023
4.7.2 148 12/4/2023
4.7.1 153 12/1/2023
4.7.0 133 11/28/2023
4.6.1 125 11/27/2023
4.6.0 159 11/25/2023
4.5.2 134 11/25/2023
4.5.1 154 11/23/2023
4.5.0 142 11/23/2023
4.4.2 145 11/22/2023
4.4.1 129 11/21/2023
4.4.0 160 11/21/2023
4.3.3 140 11/20/2023
4.3.2 113 11/20/2023
4.3.1 138 11/20/2023
4.3.0 123 11/20/2023
4.2.1 141 11/17/2023
4.2.0 141 11/17/2023
4.1.0 135 11/17/2023
4.0.0 136 11/15/2023
3.10.0 121 11/15/2023
3.9.0 138 11/15/2023
3.8.4 135 11/10/2023
3.8.3 145 11/10/2023
3.8.2 115 11/10/2023
3.8.1 135 11/10/2023
3.8.0 129 11/9/2023
3.7.0 132 11/8/2023
3.6.1 127 11/8/2023
3.6.0 117 11/7/2023
3.5.2 147 11/6/2023
3.5.1 136 11/3/2023
3.5.0 127 11/3/2023
3.4.0 156 10/25/2023
3.3.0 145 10/23/2023
3.2.0 140 10/19/2023
3.1.1 151 10/18/2023
3.1.0 162 10/18/2023
3.0.1 149 10/16/2023
2.1.4 1,027 7/14/2023
2.1.3 218 6/22/2023
2.1.2 426 5/31/2023
2.1.1 430 5/25/2023
2.1.0 307 4/4/2023
2.0.12 1,943 11/21/2022
2.0.11 378 11/21/2022
2.0.10 437 11/17/2022
2.0.9 477 11/14/2022
2.0.8 564 11/14/2022
2.0.7 591 11/7/2022
2.0.6 632 11/2/2022
2.0.5 551 10/27/2022
2.0.4 503 10/27/2022
2.0.3 771 10/3/2022
2.0.2 535 9/28/2022
2.0.1.88 609 9/23/2022
2.0.1.87 537 9/23/2022
2.0.1.86 515 9/20/2022
2.0.1.85 531 9/20/2022
2.0.1.84 527 9/19/2022
2.0.1.83 490 9/19/2022
2.0.1.82 648 9/9/2022
2.0.1.81 506 9/9/2022
2.0.1.80 493 9/9/2022
2.0.1.79 533 9/8/2022
2.0.1.78 521 9/7/2022
2.0.1.77 501 9/7/2022
2.0.1.76 482 9/7/2022
2.0.1.75 532 9/5/2022
2.0.1.74 502 9/5/2022
2.0.1.73 586 9/2/2022
2.0.1.72 531 9/1/2022
2.0.1.71 667 8/24/2022
2.0.1.70 694 8/23/2022
2.0.1.69 634 8/16/2022
2.0.1.68 639 8/10/2022
2.0.1.67 1,072 6/28/2022
2.0.1.66 568 6/17/2022
2.0.1.65 523 5/25/2022
2.0.1.64 524 5/25/2022
2.0.1.63 776 5/19/2022
2.0.1.62 672 5/11/2022
2.0.1.61 518 5/2/2022
2.0.1.60 514 4/28/2022
2.0.1.59 706 4/21/2022
2.0.1.58 546 4/18/2022
2.0.1.57 794 3/31/2022
2.0.1.56 516 3/31/2022
2.0.1.55 519 3/31/2022
2.0.1.54 512 3/29/2022
2.0.1.53 509 3/29/2022
2.0.1.52 540 3/20/2022
2.0.1.51 514 3/20/2022
2.0.1.50 520 3/20/2022
2.0.1.49 529 3/20/2022
2.0.1.48 521 3/19/2022
2.0.1.47 492 3/19/2022
2.0.1.46 493 3/19/2022
2.0.1.45 558 3/15/2022
2.0.1.44 531 3/14/2022
2.0.1.43 498 3/14/2022
2.0.1.42 513 3/10/2022
2.0.1.41 514 3/10/2022
2.0.1.40 497 3/9/2022
2.0.1.39 527 3/8/2022
2.0.1.38 512 3/8/2022
2.0.1.37 538 3/4/2022
2.0.1.36 498 3/4/2022
2.0.1.35 499 3/4/2022
2.0.1.34 528 3/3/2022
2.0.1.33 510 3/2/2022
2.0.1.32 532 2/25/2022
2.0.1.31 529 2/24/2022
2.0.1.30 513 2/23/2022
2.0.1.29 515 2/23/2022
2.0.1.28 535 2/23/2022
2.0.1.27 518 2/22/2022
2.0.1.26 522 2/12/2022
2.0.1.25 521 2/7/2022
2.0.1.24 580 2/4/2022
2.0.1.23 572 1/28/2022
2.0.1.22 534 1/28/2022
2.0.1.21 520 1/26/2022
2.0.1.20 512 1/25/2022
2.0.1.19 511 1/24/2022
2.0.1.18 531 1/23/2022
2.0.1.17 533 1/19/2022
2.0.1.16 374 12/20/2021
2.0.1.15 354 12/16/2021
2.0.1.14 541 12/9/2021
2.0.1.13 565 12/9/2021
2.0.1.12 380 12/9/2021
2.0.1.11 376 12/8/2021
2.0.1.10 351 12/7/2021
2.0.1.9 358 12/7/2021
2.0.1.8 369 12/7/2021
2.0.1.7 382 12/7/2021
2.0.1.6 368 12/7/2021
2.0.1.5 621 12/6/2021
2.0.1.4 901 12/3/2021
2.0.1.3 357 12/2/2021
2.0.1.2 348 12/2/2021
2.0.1.1 1,844 11/26/2021
2.0.1 6,020 11/24/2021