Skip to content

Commit 767f3de

Browse files
committed
- Release v1.2.0
1 parent 183114c commit 767f3de

File tree

7 files changed

+376
-32
lines changed

7 files changed

+376
-32
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
## [v1.2.0] - In Development
4+
5+
### Added
6+
- Array indexing support in JSONPath (e.g., `array[0].property`)
7+
- New comparison operators: `starts_with`, `ends_with`, and `contains`
8+
- Comprehensive unit tests for all new features
9+
10+
### Changed
11+
- Replaced JSON serialization with direct object navigation for path evaluation (50%+ performance improvement)
12+
- Optimized expression parsing without regex dependency
13+
- Fixed namespace inconsistency across library components
14+
- Implemented thread-safe operator dictionary to prevent race conditions
15+
16+
### Performance
17+
- Direct object navigation replacing JSON serialization for path evaluation (50%+ faster)
18+
- Optimized expression parsing without regex
19+
- Reduced memory allocations by 60%+
20+
21+
### Fixed
22+
- Namespace inconsistency: Changed JsonPathPredicate to JSONPredicate in supporting files
23+
- Thread safety in operator dictionary access
24+
25+
## [v1.0.0] - Initial Release
26+
- Initial release of JSONPredicate library
27+
- Core functionality with basic operators
28+
- JSONPath-style property navigation

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
next-version: 1.1.0
1+
next-version: 1.2.0
22
tag-prefix: '[vV]'
33
mode: ContinuousDeployment
44
branches:

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# <img src="https://github.com/CodeShayk/JSONPredicate/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> JSONPredicate v1.1.0
1+
# <img src="https://github.com/CodeShayk/JSONPredicate/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> JSONPredicate v1.2.0
22
[![NuGet version](https://badge.fury.io/nu/JSONPredicate.svg)](https://badge.fury.io/nu/JSONPredicate) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/CodeShayk/JSONPredicate/blob/master/LICENSE.md)
33
[![GitHub Release](https://img.shields.io/github/v/release/CodeShayk/JSONPredicate?logo=github&sort=semver)](https://github.com/CodeShayk/JSONPredicate/releases/latest)
44
[![master-build](https://github.com/CodeShayk/JSONPredicate/actions/workflows/Master-Build.yml/badge.svg)](https://github.com/CodeShayk/JSONPredicate/actions/workflows/Master-Build.yml)
@@ -18,7 +18,7 @@
1818
- **Multiple Operators**: `eq` (equal), `in` (contains), `not` (not equal), `gt` (greater than), `gte` (greater than or equal), `lt` (less than), `lte` (less than or equal)
1919
- **Logical Operators**: `and`, `or` with proper precedence handling
2020
- **Array Handling**: Evaluate conditions on `arrays` and `collections`. Support array `indexing` (Available from v1.1.0)
21-
- **String Operations**: `starts_with`, `ends_with`, `contains` (Available from v1.1.0)
21+
- **String Operations**: `starts_with`, `ends_with`, `contains` (Available from v1.2.0)
2222
- **Type Safety**: `Automatic` type conversion and validation
2323
- **Complex Expressions**: `Parentheses` grouping and `nested` operations
2424
- **Lightweight**: `Minimal` dependencies, `fast` evaluation
@@ -38,7 +38,7 @@ The expression syntax is ([JSONPath] [Comparison Operator] [Value]) [Logical Ope
3838
#### ii. Supported Operators
3939
- Comparison Operators - `eq`, `in`, `gt`, `gte`, `lt`, `lte` & `Not`
4040
- Logical Operators - `and` & `or`
41-
- String Operators - `starts_with`, `ends_with`, `contains` (Available from v1.1.0)
41+
- String Operators - `starts_with`, `ends_with`, `contains` (Available from v1.2.0)
4242
### Example
4343
```
4444
var customer = new {
@@ -66,13 +66,13 @@ bool result2 = JSONPredicate.Evaluate("client.address.postcode eq `e113et` and c
6666
bool result3 = JSONPredicate.Evaluate("client.tags in [`vip`, `standard`]", customer);
6767
bool
6868
```
69-
#### iv. String operators (Available from v1.1.0)
69+
#### iv. String operators (Available from v1.2.0)
7070
```
7171
bool result4 = JSONPredicate.Evaluate("client.address.postcode starts_with `e11`", customer);
7272
bool result5 = JSONPredicate.Evaluate("client.address.postcode ends_with `3et`", customer);
7373
bool result6 = JSONPredicate.Evaluate("client.address.postcode contains `13`", customer);
7474
```
75-
#### v. Deep Array Indexing (Available from v1.1.0)
75+
#### v. Deep Array Indexing (Available from v1.2.0)
7676
```
7777
bool result7 = JSONPredicate.Evaluate("client.tags[1] eq `premium`", customer);
7878
```
@@ -86,7 +86,7 @@ This section provides the summary of planned releases with key details about eac
8686
| Version | Release Date | Type | Key Improvements | Backward Compatible |
8787
|---------|--------------|------|------------------|-------------------|
8888
| v1.0.0 | August 2025 | Major | Initial release with core predicate evaluation | N/A |
89-
| v1.1.0 | October 2025 | Minor | Namespace consistency, thread safety, 50%+ performance improvement, array indexing, new operators (`starts_with`, `ends_with`, `contains`) | Yes |
89+
| v1.2.0 | October 2025 | Minor | Namespace consistency, thread safety, 50%+ performance improvement, array indexing, new operators (`starts_with`, `ends_with`, `contains`), comprehensive unit tests | Yes |
9090
| v2.0.0 | TBC | Major | Comprehensive validation, performance benchmarking, thread safety verification, complete documentation | Mostly* |
9191

9292
*Note: v2.0.0 marked as "Mostly" backward compatible due to major internal changes that may affect some advanced usage patterns.

Release_Roadmap.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Initial release of the JSONPredicate library. Provides core functionality for ev
2626

2727
---
2828

29-
### v1.1.0 - Combined Fix, Feature and Performance Release
29+
### v1.2.0 - Combined Fix, Feature and Performance Release
3030
**Release Type**: Minor (Backward Compatible)
3131
**Release Date**: October 2025
3232
**Focus**: Critical fixes, new functionality and performance improvements
@@ -148,24 +148,17 @@ Major feature and performance release with comprehensive validation. This releas
148148

149149
## Evolution Summary
150150

151-
### v1.0.0 → v1.1.0: Foundation, Stability, Performance and Features
151+
### v1.0.0 → v1.2.0: Foundation, Stability, Performance and Features
152152
- **Focus**: Internal consistency, thread safety, performance optimization and new functionality
153153
- **Improvement**: Fixed critical namespace inconsistency
154154
- **Improvement**: Made operator dictionary thread-safe
155155
- **Improvement**: 50%+ performance improvement through direct object navigation
156156
- **Improvement**: Expression parsing optimization removing regex dependency
157157
- **Addition**: Array indexing support (e.g., `array[0].property`)
158158
- **Addition**: New operators (`starts_with`, `ends_with`, `contains`)
159+
- **Addition**: Comprehensive unit tests for all new features
159160
- **Impact**: Better stability, reliability and performance with new features, all backward compatible
160161

161-
### v1.1.0 → v2.0.0: Validation and Production Readiness
162-
- **Focus**: Comprehensive validation and release preparation
163-
- **Achievement**: All features integrated and validated together
164-
- **Achievement**: Performance improvements quantitatively verified
165-
- **Achievement**: Thread safety comprehensively tested
166-
- **Achievement**: Complete documentation and packaging
167-
- **Impact**: Production-ready major release with all improvements validated
168-
169162
## Technical Improvements Summary
170163

171164
### Performance Improvements
@@ -188,21 +181,13 @@ Major feature and performance release with comprehensive validation. This releas
188181

189182
## Upgrade Path
190183

191-
### From v1.0.0 to v1.1.0
184+
### From v1.0.0 to v1.2.0
192185
- Drop-in replacement
193186
- No code changes required for existing functionality
194187
- Benefits: Thread safety, performance improvements, and new features available
195188

196-
### From v1.0.x to v2.0.0
197-
- Drop-in replacement for basic usage
198-
- Thorough testing recommended for advanced usage due to internal implementation changes
199-
- Benefit: All improvements and comprehensive validation
200-
201189
## Key Metrics
202190

203191
| Version | Performance Improvement | Memory Improvement | New Features | Backward Compatible |
204192
|---------|------------------------|-------------------|----------------|-------------------|
205-
| v1.1.0 | 50-70% | 60%+ | Namespace consistency, thread safety, array indexing, 3 new operators | Yes |
206-
| v2.0.0 | 50-70% (maintained) | 60%+ (maintained) | Complete validation, documentation | Mostly |
207-
208-
*Note: v2.0.0 marked as "Mostly" backward compatible due to major internal changes that may affect some advanced usage patterns.*
193+
| v1.2.0 | 50-70% | 60%+ | Namespace consistency, thread safety, array indexing, 3 new operators, comprehensive unit tests | Yes |

src/JSONPredicate/Expression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static (string Path, string Operator, string Value) Parse(string expressi
3131
throw new ArgumentException($"Invalid expression format: {expression}");
3232

3333
// Define operators in order of length (longer first) to avoid partial matches
34-
var operators = new[] { "gte", "lte", "not", "eq", "gt", "lt", "in" };
34+
var operators = new[] { "gte", "lte", "not", "eq", "gt", "lt", "in", "starts_with", "ends_with", "contains" };
3535

3636
for (int i = 0; i < expr.Length; i++)
3737
{

src/JSONPredicate/JSONPredicate.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net9.0</TargetFrameworks>
@@ -21,17 +21,17 @@
2121
<PackageProjectUrl>https://github.com/CodeShayk/JSONPredicate/wiki</PackageProjectUrl>
2222
<RepositoryUrl>https://github.com/CodeShayk/JSONPredicate</RepositoryUrl>
2323
<PackageReleaseNotes>
24-
v1.1.0 - Enhanced JSONPredicate library with significant improvements.
24+
v1.2.0 - Enhanced JSONPredicate library with additional improvements.
2525
- Array indexing support in JSONPath (e.g., `array[0].property`)
2626
- New comparison operators: `starts_with`, `ends_with`, and `contains`
2727
- Direct object navigation with 50%+ performance improvement
2828
- Thread-safe operation in multi-threaded environments
2929
- Optimized expression parsing without regex dependency.
3030

3131
For more details, visit the release page:
32-
https://github.com/CodeShayk/JSONPredicate/releases/tag/v1.1.0
32+
https://github.com/CodeShayk/JSONPredicate/releases/tag/v1.2.0
3333
</PackageReleaseNotes>
34-
<Version>1.1.0</Version>
34+
<Version>1.2.0</Version>
3535
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
3636
<AssemblyName>JSONPredicate</AssemblyName>
3737
</PropertyGroup>

0 commit comments

Comments
 (0)