Skip to content

Commit edbc3c6

Browse files
This only works with .NET 9 and above due to the dependency on JsonCraft
1 parent d4a0c74 commit edbc3c6

10 files changed

+408
-422
lines changed

Directory.Build.props

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@
33
<ItemGroup>
44
<!-- NBGV drives versions; PrivateAssets=all keeps it out of consumers -->
55
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
6-
76
<!-- SourceLink for GitHub -->
8-
<PackageReference Include="Microsoft.SourceLink.GitHub">
9-
<PrivateAssets>all</PrivateAssets>
10-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
11-
</PackageReference>
12-
7+
<PackageReference Include="Microsoft.SourceLink.GitHub"/>
138
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" />
149
</ItemGroup>
1510

@@ -48,6 +43,6 @@
4843
<!-- Global project properies -->
4944
<PropertyGroup>
5045
<ImplicitUsings>enable</ImplicitUsings>
51-
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
46+
<TargetFramework>net10.0</TargetFramework>
5247
</PropertyGroup>
5348
</Project>

Directory.Packages.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
<PrivateAssets>all</PrivateAssets>
2121
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2222
</PackageVersion>
23-
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
2423
<PackageVersion Include="JsonCons.JsonPath" Version="1.1.0" />
25-
<PackageVersion Include="JsonCraft.JsonPath" Version="1.0.0" />
26-
<PackageVersion Include="JsonPatch.Net" Version="4.0.0" />
24+
<PackageVersion Include="JsonPatch.Net" Version="4.0.1" />
2725
<PackageVersion Include="JsonPath.Net" Version="2.2.0" />
2826
<PackageVersion Include="Microsoft.AspNetCore.JsonPatch" Version="10.0.1" />
2927
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
28+
<!-- Benchmarking -->
29+
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
30+
<PackageVersion Include="JsonCraft.JsonPath" Version="1.0.0" />
3031
</ItemGroup>
3132
</Project>

README.md

Lines changed: 202 additions & 200 deletions
Large diffs are not rendered by default.

test/Hyperbee.Json.Benchmark/Hyperbee.Json.Benchmark.csproj

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net10.0</TargetFrameworks>
6-
<ImplicitUsings>enable</ImplicitUsings>
75
<IsPackable>false</IsPackable>
86
</PropertyGroup>
97

@@ -21,18 +19,11 @@
2119
<PackageReference Include="JsonPath.Net" />
2220
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" />
2321
<PackageReference Include="Newtonsoft.Json" />
22+
<PackageReference Update="Microsoft.SourceLink.GitHub" />
23+
<PackageReference Update="Nerdbank.GitVersioning" />
2424
</ItemGroup>
2525

2626
<ItemGroup>
2727
<ProjectReference Include="..\..\src\Hyperbee.Json\Hyperbee.Json.csproj" />
2828
</ItemGroup>
29-
30-
<ItemGroup>
31-
<PackageReference Update="Microsoft.SourceLink.GitHub">
32-
<PrivateAssets>all</PrivateAssets>
33-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
34-
</PackageReference>
35-
<PackageReference Update="Nerdbank.GitVersioning" />
36-
</ItemGroup>
37-
3829
</Project>

test/Hyperbee.Json.Benchmark/benchmark/results/Hyperbee.Json.Benchmark.FilterExpressionParserEvaluator-report-jsonpath.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
BenchmarkDotNet v0.15.8, Windows 11 (10.0.26200.7462/25H2/2025Update/HudsonValley2)
44
12th Gen Intel Core i9-12900HK 2.50GHz, 1 CPU, 20 logical and 14 physical cores
55
.NET SDK 10.0.101
6-
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3 [AttachedDebugger]
6+
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3 [AttachedDebugger]
7+
ShortRun : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3
78
89
910
| Method | Mean | Error
1011
| :------------------------ | ----: | -----:
1112
| FilterParser_JsonElement | NA | NA
13+
| FilterParser_JsonNode | NA | NA
1214
1315
Benchmarks with issues:
1416
FilterExpressionParserEvaluator.FilterParser_JsonElement: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3) [Filter=("world" == 'world') && (true || false)]
17+
FilterExpressionParserEvaluator.FilterParser_JsonNode: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3) [Filter=("world" == 'world') && (true || false)]
1518
```

test/Hyperbee.Json.Benchmark/benchmark/results/Hyperbee.Json.Benchmark.JsonDiffBenchmark-report-jsonpath.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
BenchmarkDotNet v0.15.8, Windows 11 (10.0.26200.7462/25H2/2025Update/HudsonValley2)
44
12th Gen Intel Core i9-12900HK 2.50GHz, 1 CPU, 20 logical and 14 physical cores
55
.NET SDK 10.0.101
6-
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3 DEBUG
6+
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3 [AttachedDebugger]
77
ShortRun : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3
88
99
10-
| Method | Mean | Error | StdDev | Allocated
11-
| :-------------------- | --------: | ---------: | --------: | ---------:
12-
| JsonDiff_JsonNode | 438.2 ns | 45.95 ns | 2.52 ns | 1.3 KB
13-
| JsonDiff_JsonElement | 663.2 ns | 538.12 ns | 29.50 ns | 1.93 KB
14-
| | | | |
15-
| JsonDiff_JsonNode | 347.0 ns | 117.11 ns | 6.42 ns | 1.2 KB
16-
| JsonDiff_JsonElement | 472.1 ns | 175.95 ns | 9.64 ns | 1.66 KB
10+
| Method | Mean | Error | StdDev | Allocated
11+
| :-------------------- | --------: | ---------: | -------: | ---------:
12+
| JsonDiff_JsonNode | 431.2 ns | 109.04 ns | 5.98 ns | 1.3 KB
13+
| JsonDiff_JsonElement | 636.4 ns | 70.49 ns | 3.86 ns | 1.93 KB
14+
| | | | |
15+
| JsonDiff_JsonNode | 335.6 ns | 80.57 ns | 4.42 ns | 1.2 KB
16+
| JsonDiff_JsonElement | 507.5 ns | 180.81 ns | 9.91 ns | 1.66 KB
1717
```

test/Hyperbee.Json.Benchmark/benchmark/results/Hyperbee.Json.Benchmark.JsonPatchBenchmark-report-jsonpath.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
BenchmarkDotNet v0.15.8, Windows 11 (10.0.26200.7462/25H2/2025Update/HudsonValley2)
44
12th Gen Intel Core i9-12900HK 2.50GHz, 1 CPU, 20 logical and 14 physical cores
55
.NET SDK 10.0.101
6-
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3 DEBUG
6+
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3 [AttachedDebugger]
77
ShortRun : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3
88
99
10-
| Method | Mean | Error | StdDev | Allocated
11-
| :----------------------- | ---------: | ---------: | ---------: | ---------:
12-
| Hyperbee_JsonElement | 79.45 ns | 34.78 ns | 1.906 ns | 392 B
13-
| Hyperbee_JsonNode | 84.85 ns | 64.17 ns | 3.517 ns | 392 B
14-
| JsonEverything_JsonNode | 188.61 ns | 319.11 ns | 17.491 ns | 968 B
15-
| AspNetCore_JsonNode | 353.32 ns | 106.43 ns | 5.834 ns | 1024 B
10+
| Method | Mean | Error | StdDev | Allocated
11+
| :----------------------- | ---------: | ---------: | --------: | ---------:
12+
| Hyperbee_JsonNode | 78.55 ns | 14.146 ns | 0.775 ns | 392 B
13+
| Hyperbee_JsonElement | 83.08 ns | 11.340 ns | 0.622 ns | 392 B
14+
| JsonEverything_JsonNode | 184.07 ns | 2.770 ns | 0.152 ns | 968 B
15+
| AspNetCore_JsonNode | 325.06 ns | 51.946 ns | 2.847 ns | 1024 B
1616
```

0 commit comments

Comments
 (0)