JsonCollectionNet 0.1.4

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

// Install JsonCollectionNet as a Cake Tool
#tool nuget:?package=JsonCollectionNet&version=0.1.4                

JsonCollectionNet

JsonCollectionNet is a library designed to perform aggregation queries on JSON data. Inspired by MongoDB's aggregation pipeline, this library is designed to allow efficient handling and analysis of JSON data in C#. Users can filter, group, sort, and limit data using simple JSON-based queries.

Features

  • Filtering: Use $match to filter data based on conditions.
  • Grouping: Use $group to group data by specified criteria and perform aggregations.
  • Sorting: Use $sort to sort data.
  • Limiting: Use $limit to restrict the number of results returned.

Installation

JsonCollectionNet is available as a NuGet package. Install it using the following NuGet command:

dotnet add package JsonCollectionNet

Usage

Initializing JSON Data

using JsonCollectionNet;
using System.Text.Json;

var json = @"[
    { ""id"": 1, ""name"": ""Alice"", ""age"": 30 },
    { ""id"": 2, ""name"": ""Bob"", ""age"": 25 }
]";
JsonElement data = JsonSerializer.Deserialize<JsonElement>(json);

Aggregating Data

var collection = new JsonCollection(data);

// Filter users older than 30
var aggregateQuery = @"{ $match: { age: { $gt: 30 } } }";
JsonElement result = collection.Aggregate(aggregateQuery);

Support and Contributions

  • Bug reports and feature requests: Please use the GitHub issue tracker.
  • Contributions: You are welcome to contribute via pull requests. Please read CONTRIBUTING.md before contributing.

This library was created for developers who want to easily handle complex JSON data structures. Simplify your data processing with JsonCollectionNet!

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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.4 98 4/25/2024
0.1.3 81 4/24/2024
0.1.2 89 4/19/2024
0.1.1 87 4/19/2024