{"id":50849526,"url":"https://github.com/disaverio/ucast","last_synced_at":"2026-06-14T12:34:47.761Z","repository":{"id":360274326,"uuid":"1229065501","full_name":"disaverio/ucast","owner":"disaverio","description":"Kotlin library to build, validate, normalize and (de)serialize UCAST expressions.","archived":false,"fork":false,"pushed_at":"2026-05-25T17:48:55.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T19:31:06.354Z","etag":null,"topics":["boolean-expressions","dsl","json","kotlin","opa","ucast"],"latest_commit_sha":null,"homepage":"https://central.sonatype.com/artifact/dev.disaverio/ucast","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/disaverio.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-04T17:01:15.000Z","updated_at":"2026-05-25T17:48:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/disaverio/ucast","commit_stats":null,"previous_names":["disaverio/ucast"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/disaverio/ucast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disaverio%2Fucast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disaverio%2Fucast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disaverio%2Fucast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disaverio%2Fucast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disaverio","download_url":"https://codeload.github.com/disaverio/ucast/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disaverio%2Fucast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34322074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["boolean-expressions","dsl","json","kotlin","opa","ucast"],"created_at":"2026-06-14T12:34:47.041Z","updated_at":"2026-06-14T12:34:47.754Z","avatar_url":"https://github.com/disaverio.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ucast\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Maven Central](https://img.shields.io/maven-central/v/dev.disaverio/ucast.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/dev.disaverio/ucast)\n\nA Kotlin library that models, builds, serializes and normalizes\n[UCAST](https://github.com/stalniy/ucast) boolean expressions — the JSON-based format\nalso adopted in OPA - Open Policy Agent, [see docs](https://www.openpolicyagent.org/docs/filtering/ucast-syntax).\n\n`ucast-lib` provides:\n\n- A type-safe model of UCAST expressions (`CompoundExpression`, `FieldExpression`).\n- A Kotlin DSL for building expressions ergonomically.\n- JSON serialization in two dialects: **expanded** and **concise**.\n- A normalization primitive that converts an arbitrary expression into [Disjunctive Normal Form](https://en.wikipedia.org/wiki/Disjunctive_normal_form).\n\n## Install\n\nChoose the version that matches the Jackson major version used in your project.\n\n| Your Jackson dependency | `ucast` version to use |\n|------------------------|------------------------|\n| `com.fasterxml.jackson` (Jackson 2.x) | `0.0.0` |\n| `tools.jackson` (Jackson 3.x) | `1.0.0` |\n\n### Maven\n\n**Jackson 3.x projects (`tools.jackson`)**\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edev.disaverio\u003c/groupId\u003e\n    \u003cartifactId\u003eucast\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n**Jackson 2.x projects (`com.fasterxml.jackson`)**\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edev.disaverio\u003c/groupId\u003e\n    \u003cartifactId\u003eucast\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle (Kotlin DSL)\n\n**Jackson 3.x projects (`tools.jackson`)**\n\n```kotlin\ndependencies {\n    implementation(\"dev.disaverio:ucast:1.0.0\")\n}\n```\n\n**Jackson 2.x projects (`com.fasterxml.jackson`)**\n\n```kotlin\ndependencies {\n    implementation(\"dev.disaverio:ucast:0.0.0\")\n}\n```\n\n## Quick example\n\n```kotlin\nimport dev.disaverio.ucast.dsl.*\n\nval expr = and {\n    \"age\" gte 18\n    or {\n        \"role\" eq \"admin\"\n        \"department\" `in` listOf(\"eng\", \"sec\")\n    }\n    not {\n        \"status\" eq \"banned\"\n    }\n}\n```\n\n## Grammar\n\nThe two supported syntaxes are documented under [`src/main/resources/definitions`](src/main/resources/definitions) as resources:\n\n- [Expanded grammar](src/main/resources/definitions/ucast-expanded-grammar.txt) — JSON Schema available in [`ucast-grammar.json`](src/main/resources/definitions/ucast-grammar.json).\n- [Concise grammar](src/main/resources/definitions/ucast-concise-grammar.txt) — sugared form with implicit-AND objects and field shorthand.\n\nNote: the concise dialect is currently emit-only; deserialization supports the expanded form only.\n\n## Build\n\nRequires JDK 17+.\n\n```bash\nmvn clean test\n```\n\n## License\n\nApache License 2.0 — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisaverio%2Fucast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisaverio%2Fucast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisaverio%2Fucast/lists"}