{"id":30575849,"url":"https://github.com/codeshayk/jsonpredicate","last_synced_at":"2025-08-29T00:32:35.129Z","repository":{"id":310563335,"uuid":"1040379695","full_name":"CodeShayk/JSONPredicate","owner":"CodeShayk","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-18T23:21:03.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-18T23:22:01.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeShayk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-18T22:22:21.000Z","updated_at":"2025-08-18T23:21:07.000Z","dependencies_parsed_at":"2025-08-18T23:33:04.027Z","dependency_job_id":null,"html_url":"https://github.com/CodeShayk/JSONPredicate","commit_stats":null,"previous_names":["codeshayk/jsonpredicate"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/CodeShayk/JSONPredicate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeShayk%2FJSONPredicate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeShayk%2FJSONPredicate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeShayk%2FJSONPredicate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeShayk%2FJSONPredicate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeShayk","download_url":"https://codeload.github.com/CodeShayk/JSONPredicate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeShayk%2FJSONPredicate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272589916,"owners_count":24960828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-29T00:31:29.764Z","updated_at":"2025-08-29T00:32:35.113Z","avatar_url":"https://github.com/CodeShayk.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://github.com/CodeShayk/JSONPredicate/blob/master/Images/ninja-icon-16.png\" alt=\"ninja\" style=\"width:30px;\"/\u003e JSONPredicate v1.0.0\n[![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) \n[![GitHub Release](https://img.shields.io/github/v/release/CodeShayk/JSONPredicate?logo=github\u0026sort=semver)](https://github.com/CodeShayk/JSONPredicate/releases/latest)\n[![master-build](https://github.com/CodeShayk/JSONPredicate/actions/workflows/Master-Build.yml/badge.svg)](https://github.com/CodeShayk/JSONPredicate/actions/workflows/Master-Build.yml)\n[![master-codeql](https://github.com/CodeShayk/JSONPredicate/actions/workflows/Master-CodeQL.yml/badge.svg)](https://github.com/CodeShayk/JSONPredicate/actions/workflows/Master-CodeQL.yml)\n[![.Net 9.0](https://img.shields.io/badge/.Net-9.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)\n[![.Net Framework 4.6.4](https://img.shields.io/badge/.Net-4.6.2-blue)](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net46)\n[![.Net Standard 2.0](https://img.shields.io/badge/.NetStandard-2.0-blue)](https://github.com/dotnet/standard/blob/v2.0.0/docs/versions/netstandard2.0.md)\n\n## What is JSONPredicate?\n\n.Net library to provide a powerful and intuitive way to evaluate string-based predicate expressions against JSON objects using JSONPath syntax.\n\n## Features\n\n- **JSONPath Support**: Access `nested` object properties using `dot` notation\n- **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)\n- **Logical Operators**: `and`, `or` with proper precedence handling\n- **Type Safety**: `Automatic` type conversion and validation\n- **Complex Expressions**: `Parentheses` grouping and `nested` operations\n- **Lightweight**: `Minimal` dependencies, `fast` evaluation\n\n## Installation\n\nInstall via NuGet Package Manager:\n```bash\nInstall-Package JsonPathPredicate\n```\n## Getting Started\nThe library provides a powerful, flexible way to evaluate complex conditional logic against JSON objects, making it ideal for business rules, filtering, validation, and many other use cases in .NET applications.\n#### i. Expression Syntax\nThe expression syntax is ([JSONPath] [Comparison Operator] [Value]) [Logical Operator] ([JSONPath] [Comparison Operator] [Value])\n#### ii. Supported Operators\n- Comparison Operators - `eq`, `in`, `gt`, `gte`, `lt`, `lte` \u0026 `Not`\n- Logical Operators - `and` \u0026 `or`\n### Example\n```\nvar customer = new {\n    client = new {\n        address = new {\n            postcode = \"e113et\",\n            number = 123,\n            active = true\n        },\n        tags = new[] { \"vip\", \"premium\" }\n    },\n    score = 95.5\n};\n```\n#### i. Simple equality\n```\nbool result1 = JSONPredicate.Evaluate(\"client.address.postcode eq `e113et`\", customer);\n```\n#### ii. Logical operators\n```\nbool result2 = JSONPredicate.Evaluate(\"client.address.postcode eq `e113et` and client.address.number eq 123\", customer);\n```\n#### iii. Array operations\n```\nbool result3 = JSONPredicate.Evaluate(\"client.tags in [`vip`, `standard`]\", customer);\n```\n## Developer Guide\nPlease see [Developer Guide](https://github.com/CodeShayk/JSONPredicate/wiki) for comprehensive documentation to integrate JSONPredicate in your project.\n\n## License\nThis project is licensed under the `MIT License` - see the [license](LICENSE) file for details.\n\n## Contributing\nWe welcome contributions! Please see our Contributing Guide for details.\n- 📖 Read the [Documentation](https://github.com/CodeShayk/JSONPredicate/wiki)\n- 🐛 If you are having problems, please let us know by raising a new issue [here](https://github.com/CodeShayk/JSONPredicate/issues/new/choose).\n- 💬 Ask questions on [Discussions](https://github.com/CodeShayk/JSONPredicate/discussions)\n- 💻 Code - Submit [pull](https://github.com/CodeShayk/JSONPredicate/pulls) requests\n\n## Credits\nThank you for reading. Please fork, explore, contribute and report. Happy Coding !! :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeshayk%2Fjsonpredicate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeshayk%2Fjsonpredicate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeshayk%2Fjsonpredicate/lists"}