{"id":15138537,"url":"https://github.com/noenv/vertx-jsonpath","last_synced_at":"2025-10-23T15:30:29.385Z","repository":{"id":60603065,"uuid":"490708564","full_name":"NoEnv/vertx-jsonpath","owner":"NoEnv","description":"Lightweight JsonPath for Vert.x","archived":false,"fork":false,"pushed_at":"2024-12-23T22:11:29.000Z","size":104,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-30T19:11:14.931Z","etag":null,"topics":["json","jsonpath","vertx"],"latest_commit_sha":null,"homepage":"","language":"Java","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/NoEnv.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2022-05-10T13:27:25.000Z","updated_at":"2025-01-21T13:00:24.000Z","dependencies_parsed_at":"2024-02-07T14:27:29.123Z","dependency_job_id":"b17e9a4a-1ce9-4826-92e0-8fc9151ddb06","html_url":"https://github.com/NoEnv/vertx-jsonpath","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoEnv%2Fvertx-jsonpath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoEnv%2Fvertx-jsonpath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoEnv%2Fvertx-jsonpath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoEnv%2Fvertx-jsonpath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoEnv","download_url":"https://codeload.github.com/NoEnv/vertx-jsonpath/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237843798,"owners_count":19375205,"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","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":["json","jsonpath","vertx"],"created_at":"2024-09-26T07:40:51.311Z","updated_at":"2025-10-23T15:30:29.379Z","avatar_url":"https://github.com/NoEnv.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"image:https://github.com/NoEnv/vertx-jsonpath/actions/workflows/ci.yml/badge.svg[\"Build Status\",link=\"https://github.com/NoEnv/vertx-jsonpath/actions/workflows/ci.yml\"]\nimage:https://codecov.io/gh/NoEnv/vertx-jsonpath/branch/main/graph/badge.svg[\"Code Coverage\",link=\"https://codecov.io/gh/NoEnv/vertx-jsonpath\"]\nimage:https://badgen.net/maven/v/maven-central/com.noenv/vertx-jsonpath[\"Maven Central\",link=\"https://search.maven.org/artifact/com.noenv/vertx-jsonpath\"]\nimage:https://badgen.net/discord/online-members/mZAjkQfYSj[\"Discord\",link=\"https://discord.gg/mZAjkQfYSj\"]\n\n= Vert.x-JsonPath\n\nVert.x-JsonPath is a _very_ basic implementation of https://goessner.net/articles/JsonPath/[JsonPath] using Vert.x's `JsonObject` and `JsonArray`, mimicking their `getX`, `containsKey`, `put` and `remove` methods. Only three operators are supported at the moment (`$`, `.`, and `[]`).\n\nThis is *not* an implementation of https://tools.ietf.org/html/rfc6901[RFC6901]. Vert.x core already contains an implementation of RFC6901.\n\n== Quick Start\n\nTo use Vert.x JsonPath, add the following dependency:\n\n* Maven (in your `pom.xml`):\n\n[source,xml,subs=\"+attributes\"]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.noenv\u003c/groupId\u003e\n  \u003cartifactId\u003evertx-jsonpath\u003c/artifactId\u003e\n  \u003cversion\u003e5.0.5\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n* Gradle (in your `build.gradle` file):\n\n[source,groovy,subs=\"+attributes\"]\n----\ncompile 'com.noenv:vertx-jsonpath:5.0.5'\n----\n\nConsider the following json:\n\n[source,json]\n----\n{\n  \"name\": {\n    \"first\": \"Max\",\n    \"last\": \"Mustermann\",\n    \"nicknames\": [\"Maxi\", \"Mustermax\"]\n  },\n  \"contact\": {\n    \"address\": {\n      \"home\": {\n        \"street\": \"Memory Lane\",\n        \"number\": 16,\n        \"verified\": \"1984-05-27T00:01:02.034Z\"\n      }\n    }\n  },\n  \"some.dotted.key\": \"fnord\",\n  \"subscriptions\": [\n    { \"active\": true, \"sid\": \"1234567\", \"created\": \"2020-01-14T16:31:11.425Z\" },\n    { \"active\": false, \"sid\": \"8472232\", \"created\": \"2018-06-14T17:21:51.438Z\" },\n    { \"active\": true, \"sid\": \"9362444\", \"created\": \"2019-01-14T07:48:15.821Z\" }\n  ]\n}\n----\n\nThere are `getX` methods for all Vert.x types:\n\n[source,java]\n----\nJsonPath.getString(json, \"$.name.first\") // \"Max\"\nJsonPath.getString(json, \"$.name.greeting\", \"Hello\") // \"Hello\" (provided as default value)\nJsonPath.getInteger(json, \"$.contact.address.home.number\") // 16\nJsonPath.getInstant(json, \"$.contact.address.home.verified\") // \"1984-05-27T00:01:02.034Z\"\nJsonPath.getJsonArray(json, \"$.name.nicknames\") // [\"Maxi\", \"Mustermax\"]\nJsonPath.getJsonObject(json, \"$.subscriptions[0]\") // { \"active\": true, \"sid\": \"1234567\" ... }\n// etc.\n----\n\nDotted keys are supported (e.g. `$.['some.dotted.key']`):\n\n[source,java]\n----\nJsonPath.getString(json, \"$.['some.dotted.key']\") // \"fnord\"\n----\n\nAlso the `containsKey` method is provided:\n\n[source,java]\n----\nJsonPath.containsKey(json, \"$.name.nicknames\") // true\nJsonPath.containsKey(json, \"$.foo.bar.eek\") // false\n----\n\nThe object can be updated using `put`:\n\n[source,java]\n----\nJsonPath.put(json, \"$.name.first\", \"Robert\");\nJsonPath.put(json, \"$.subscriptions[2].active\", false);\n----\n\nKeys can be removed using `remove` (not yet implemented for arrays):\n\n[source,java]\n----\nJsonPath.remove(json, \"$.name.nicknames\");\nJsonPath.remove(json, \"$.subscriptions[2].active\");\n----\n\nAll of the above also works with `JsonArrays`:\n\n[source,json]\n----\n[\n  {\"foo\": \"bar\"},\n  [1, 2, 3]\n]\n----\n\n[source,java]\n----\nJsonPath.getString(jsonarr, \"$[0].foo\") // \"bar\"\nJsonPath.getInteger(jsonarr, \"$[1][2]\") // 3\nJsonPath.containsKey(jsonarr, \"$[0].foo\") // true\nJsonPath.put(jsonarr, \"$[0].foo\", \"eek\");\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoenv%2Fvertx-jsonpath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoenv%2Fvertx-jsonpath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoenv%2Fvertx-jsonpath/lists"}