JsonCollectionNet 0.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package JsonCollectionNet --version 0.1.2                
NuGet\Install-Package JsonCollectionNet -Version 0.1.2                
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.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JsonCollectionNet --version 0.1.2                
#r "nuget: JsonCollectionNet, 0.1.2"                
#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.2

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

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.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

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 89 4/25/2024
0.1.3 72 4/24/2024
0.1.2 82 4/19/2024
0.1.1 79 4/19/2024