JQL.Net
1.0.3
dotnet add package JQL.Net --version 1.0.3
NuGet\Install-Package JQL.Net -Version 1.0.3
<PackageReference Include="JQL.Net" Version="1.0.3" />
<PackageVersion Include="JQL.Net" Version="1.0.3" />
<PackageReference Include="JQL.Net" />
paket add JQL.Net --version 1.0.3
#r "nuget: JQL.Net, 1.0.3"
#:package JQL.Net@1.0.3
#addin nuget:?package=JQL.Net&version=1.0.3
#tool nuget:?package=JQL.Net&version=1.0.3
🚀 JQL.Net (JSON Query Language for .NET)
Bring the power of SQL to your JSON! 🎯
JQL.Net is a lightweight, high-performance query engine that lets you search, join, and aggregate raw JSON data using familiar SQL-like syntax. Perfect for those moments when you have complex JSON structures but don't want the overhead of a database.
✨ Features
- 🔍 SQL-Like Syntax: Use
SELECT,FROM,WHERE,JOIN,GROUP BY,HAVING, andORDER BY. - 🤝 Advanced Joins: Support for multiple conditions in
ONusingAND/ORlogic. - 🧮 Aggregations: Built-in support for
SUM,COUNT,AVG,MIN, andMAX. - ☁️ Case-Insensitive: Keywords like
selectorSELECT? We don't judge. It just works. - 🏷️ Alias Support: Use
ASto keep your results clean and readable. - ⚡ Lightweight: Zero database dependencies. Just you and your JSON.
📦 Installation
Grab it on NuGet:
dotnet add package JQL.Net
🚀 Quick Start
Using JQL.Net is as easy as ordering pizza. Check this out:
using JQL.Net.Extensions;
using Newtonsoft.Json.Linq;
// 1. Your raw JSON data
var json = @"{
'employees': [
{ 'id': 1, 'name': 'John Doe', 'dept_id': 10, 'salary': 8000 },
{ 'id': 2, 'name': 'Jane Smith', 'dept_id': 10, 'salary': 9500 }
],
'departments': [
{ 'id': 10, 'name': 'IT', 'budget': 20000 }
]
}";
var data = JObject.Parse(json);
// 2. Write your 'SQL'
string query = @"
SELECT e.name, d.name AS DeptName
FROM $.employees AS e
JOIN $.departments AS d ON e.dept_id == d.id
WHERE e.salary > 5000";
// 3. Execute!
var results = data.Query(query);
foreach (var row in results) {
Console.WriteLine($"{row["name"]} works in {row["DeptName"]}");
}
💡 Cool Examples
Complex Joins (The 'AND/OR' Power) 🦾
Need to link data with multiple rules? No problem:
SELECT e.name, p.proj_name
FROM $.employees AS e
JOIN $.projects AS p ON e.proj_id == p.id AND p.status == 'Active'
Aggregations & Having 📊
Want to find big-spending departments?
SELECT d.name, SUM(salary) AS total_cost
FROM $.employees AS e
JOIN $.departments AS d ON dept_id == id
GROUP BY d.name
HAVING total_cost > d.budget
🛠️ Supported Keywords
| Keyword | Description |
|---|---|
SELECT |
Choose which fields to return (supports Aliases). |
FROM |
Define the JSON path (default is $). |
JOIN |
Combine two JSON arrays with ON logic. |
WHERE |
Filter results with ==, !=, >, <, etc. |
GROUP BY |
Bundle results by specific fields. |
HAVING |
Filter aggregated groups. |
ORDER BY |
Sort your output. |
🤝 Contributing
Got a cool idea or found a bug? 🐛
- Fork it!
- Create your feature branch (
git checkout -b feature/cool-stuff) - Commit your changes (
git commit -m 'Add some cool stuff') - Push to the branch (
git push origin feature/cool-stuff) - Open a Pull Request.
📄 License
This project is licensed under the MIT License.
Made with ❤️ for the .NET Community. If you find JQL.Net useful, give it a ⭐ on GitHub!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net9.0 was computed. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.