JsonEvalRs 0.0.96
dotnet add package JsonEvalRs --version 0.0.96
NuGet\Install-Package JsonEvalRs -Version 0.0.96
<PackageReference Include="JsonEvalRs" Version="0.0.96" />
<PackageVersion Include="JsonEvalRs" Version="0.0.96" />
<PackageReference Include="JsonEvalRs" />
paket add JsonEvalRs --version 0.0.96
#r "nuget: JsonEvalRs, 0.0.96"
#:package JsonEvalRs@0.0.96
#addin nuget:?package=JsonEvalRs&version=0.0.96
#tool nuget:?package=JsonEvalRs&version=0.0.96
JsonEvalRs - C# Bindings
High-performance JSON Logic evaluator with schema validation and dependency tracking for .NET applications.
Features
- 🚀 Blazing Fast - Built on Rust for maximum performance
- ✅ Schema Validation - Validate data against JSON schema rules
- 🔄 Dependency Tracking - Auto-update dependent fields
- 🎯 Type Safe - Full .NET type safety with JSON.NET integration
- 📦 Cross-Platform - Works on Windows, Linux, and macOS
- 🔌 Easy Integration - Simple API, just a few lines of code
Installation
dotnet add package JsonEvalRs
Or via NuGet Package Manager:
Install-Package JsonEvalRs
Quick Start
using JsonEvalRs;
using Newtonsoft.Json.Linq;
// Create evaluator with schema
string schema = @"{
""type"": ""object"",
""properties"": {
""user"": {
""type"": ""object"",
""properties"": {
""name"": {
""type"": ""string"",
""rules"": {
""required"": { ""value"": true, ""message"": ""Name is required"" },
""minLength"": { ""value"": 3, ""message"": ""Min 3 characters"" }
}
},
""age"": {
""type"": ""number"",
""rules"": {
""minValue"": { ""value"": 18, ""message"": ""Must be 18+"" }
}
}
}
}
}
}";
using (var eval = new JSONEval(schema))
{
// Evaluate
string data = @"{ ""user"": { ""name"": ""John"", ""age"": 25 } }";
JObject result = eval.Evaluate(data);
Console.WriteLine($"Evaluated: {result}");
// Validate
ValidationResult validation = eval.Validate(data);
if (validation.HasError)
{
foreach (var error in validation.Errors)
{
Console.WriteLine($"{error.Path}: {error.Message}");
}
}
// Re-evaluate after changes
string updatedData = @"{ ""user"": { ""name"": ""John"", ""age"": 30 } }";
JObject updated = eval.EvaluateDependents(
new List<string> { "user.age" },
updatedData,
nested: true
);
}
API Reference
JSONEval Constructor
public JSONEval(string schema, string context = null, string data = null)
Creates a new evaluator instance.
Parameters:
schema(string): JSON schema definitioncontext(string, optional): Context data for evaluationsdata(string, optional): Initial data
Evaluate Method
public JObject Evaluate(string data, string context = null)
Evaluates the schema with provided data.
Parameters:
data(string): JSON data to evaluatecontext(string, optional): Context data
Returns: JObject with evaluated schema
Validate Method
public ValidationResult Validate(string data, string context = null)
Validates data against schema rules.
Parameters:
data(string): JSON data to validatecontext(string, optional): Context data
Returns: ValidationResult with errors (if any)
EvaluateDependents Method
public JObject EvaluateDependents(
List<string> changedPaths,
string data,
string context = null,
bool nested = true
)
Re-evaluates fields that depend on changed paths.
Parameters:
changedPaths(List<string>): Paths that changeddata(string): Updated datacontext(string, optional): Context datanested(bool): Follow dependency chains recursively
Returns: JObject with updated evaluated schema
Validation Rules
Supported validation rules:
- required - Field must have a value
- minLength / maxLength - String/array length validation
- minValue / maxValue - Numeric range validation
- pattern - Regex pattern matching
Platform Support
- .NET Standard 2.0+ - Compatible with .NET Framework 4.6.1+
- .NET 6/7/8 - Latest .NET versions
- Windows - x64
- Linux - x64
- macOS - x64, ARM64
Performance
Typical performance characteristics:
- Schema parsing: < 5ms
- Evaluation: < 10ms for complex schemas
- Validation: < 5ms
Error Handling
All methods throw JsonEvalException on errors:
try
{
var result = eval.Evaluate(data);
}
catch (JsonEvalException ex)
{
Console.WriteLine($"Evaluation error: {ex.Message}");
}
Memory Management
JSONEval implements IDisposable. Always dispose instances:
using (var eval = new JSONEval(schema))
{
// Use eval
} // Automatically disposed
// Or manually
var eval = new JSONEval(schema);
try
{
// Use eval
}
finally
{
eval.Dispose();
}
License
MIT License
Support
- GitHub Issues: https://github.com/byrizki/jsoneval-rs/issues
- Documentation: https://github.com/byrizki/jsoneval-rs
Version
string version = JSONEval.Version;
Console.WriteLine($"JsonEvalRs version: {version}");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. 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 was computed. 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. 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net10.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
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.0.96 | 90 | 5/6/2026 |
| 0.0.95 | 92 | 5/6/2026 |
| 0.0.94 | 80 | 5/5/2026 |
| 0.0.93 | 89 | 5/5/2026 |
| 0.0.92 | 80 | 5/5/2026 |
| 0.0.91 | 84 | 5/5/2026 |
| 0.0.90 | 88 | 5/4/2026 |
| 0.0.89 | 83 | 5/4/2026 |
| 0.0.88 | 85 | 5/3/2026 |
| 0.0.87 | 112 | 4/27/2026 |
| 0.0.86 | 114 | 4/13/2026 |
| 0.0.85 | 103 | 4/12/2026 |
| 0.0.84 | 108 | 4/5/2026 |
| 0.0.83 | 102 | 4/5/2026 |
| 0.0.82 | 112 | 4/4/2026 |
| 0.0.81 | 111 | 4/1/2026 |
| 0.0.80 | 106 | 3/31/2026 |
| 0.0.79 | 103 | 3/31/2026 |
| 0.0.78 | 102 | 3/31/2026 |
| 0.0.77 | 101 | 3/31/2026 |