{"id":22423063,"url":"https://github.com/arakelian/json-filter","last_synced_at":"2025-08-01T19:32:04.536Z","repository":{"id":57717425,"uuid":"91027564","full_name":"arakelian/json-filter","owner":"arakelian","description":"High speed filtering of arbitrarily large JSON documents","archived":false,"fork":false,"pushed_at":"2023-04-24T03:53:26.000Z","size":507,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T20:40:07.167Z","etag":null,"topics":["filter","filtering","high-performance","java","java-8","json","json-filter","json-stream","streaming"],"latest_commit_sha":null,"homepage":null,"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/arakelian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-05-11T22:09:35.000Z","updated_at":"2024-02-06T14:45:34.000Z","dependencies_parsed_at":"2025-06-27T20:32:31.679Z","dependency_job_id":"bff21c78-aee6-4976-8bf2-37f5c3c5b8a6","html_url":"https://github.com/arakelian/json-filter","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/arakelian/json-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arakelian%2Fjson-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arakelian%2Fjson-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arakelian%2Fjson-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arakelian%2Fjson-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arakelian","download_url":"https://codeload.github.com/arakelian/json-filter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arakelian%2Fjson-filter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268285995,"owners_count":24225842,"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-01T02:00:08.611Z","response_time":67,"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":["filter","filtering","high-performance","java","java-8","json","json-filter","json-stream","streaming"],"created_at":"2024-12-05T18:09:06.810Z","updated_at":"2025-08-01T19:32:04.509Z","avatar_url":"https://github.com/arakelian.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-filter\n[![version](https://img.shields.io/maven-metadata/v.svg?label=release\u0026metadataUrl=https://repo1.maven.org/maven2/com/arakelian/json-filter/maven-metadata.xml)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.arakelian%22%20AND%20a%3A%22json-filter%22)\n[![CI](https://github.com/arakelian/json-filter/actions/workflows/ci.yml/badge.svg)](https://github.com/arakelian/json-filter/actions/workflows/ci.yml)\n\nHigh-speed stream-based filtering of arbitrarily large JSON documents.\n\nThis library takes extraordinary pains to insure that Java objects are not created unnecessarily while processing\nthe input and output streams.\n\nThere are no dependencies on any third-party JSON libraries to ensure small code size, and to maximum performance\nof JSON streaming for the purpose of filtering. \n\nApplications:\n* Redacting content that client is not allowed to see\n* Reducing the size of large JSON before parsing using a library like Jackson \n\n\n## Requirements\n\n* Compatible with Java 8+\n\n## Usage\n\nFiltering a JSON stream is very easy:\n\n```java\n// configure input and output streams\nJsonReader reader = new JsonReader(\u003cinstance of java.io.Reader\u003e)\nJsonWriter writer = new JsonWriter(\u003cinstance of java.io.Writer\u003e)\n\n// configure filter\nJsonFilterOptions opts = ImmutableJsonFilterOptions.builder() //\n  .addExcludes(\"some/path/to/exclude\") //\n  .addExcludes(\"another/path/to/exclude\") //\n  .pretty(true) //\n  .build();\n  \n// execute filter\nJsonFilter filter = new JsonFilter(reader,writer,options);\nfilter.process();\n```\n\n## Paths\n\nPaths are used to identify JSON fragments that should be included or excluded.  The forward slash (`/`) \ncharacter can be used to identify nested JSON elements.\n\nConsider the following JSON:\n\n```java\n{\n  \"store\": {\n    \"book\": [\n      {\n        \"category\": \"reference\",\n        \"author\": \"Nigel Rees\",\n        \"title\": \"Sayings of the Century\",\n        \"price\": 8.95\n      },\n      {\n        \"category\": \"fiction\",\n        \"author\": \"Evelyn Waugh\",\n        \"title\": \"Sword of Honour\",\n        \"price\": 12.99\n      },\n      {\n        \"category\": \"fiction\",\n        \"author\": \"Herman Melville\",\n        \"title\": \"Moby Dick\",\n        \"isbn\": \"0-553-21311-3\",\n        \"price\": 8.99\n      },\n      {\n        \"category\": \"fiction\",\n        \"author\": \"J. R. R. Tolkien\",\n        \"title\": \"The Lord of the Rings\",\n        \"isbn\": \"0-395-19395-8\",\n        \"price\": 22.99\n      }\n    ],\n    \"bicycle\": {\n      \"color\": \"red\",\n      \"price\": 19.95\n    }\n  },\n  \"expensive\": 10\n}\n```\n\nThe following paths could be constructed:\n* `expensive` would resolve to a single node with a value of `10`\n* `store/book/category` would resolve to 4 nodes with values of `reference` and `fiction`.\n* `store/bicycle/color` would resolve to a single node with a value of `19.95`. \n\nNote that paths do not need to contain array indices, e.g. `[]`. In the example above, `store/book` is an array,\nbut the path `store/book/category` implies traversal through the elements of each of `book`.\n \n\n## Installation\n\nThe library is available on [Maven Central](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.arakelian%22%20AND%20a%3A%22json-filter%22).\n\n### Maven\n\nAdd the following to your `pom.xml`:\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ecentral\u003c/id\u003e\n        \u003cname\u003eCentral Repository\u003c/name\u003e\n        \u003curl\u003ehttp://repo.maven.apache.org/maven2\u003c/url\u003e\n        \u003creleases\u003e\n            \u003cenabled\u003etrue\u003c/enabled\u003e\n        \u003c/releases\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n...\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.arakelian\u003c/groupId\u003e\n    \u003cartifactId\u003ejson-filter\u003c/artifactId\u003e\n    \u003cversion\u003e4.0.1\u003c/version\u003e\n    \u003cscope\u003ecompile\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\nAdd the following to your `build.gradle`:\n\n```groovy\nrepositories {\n  mavenCentral()\n}\n\ndependencies {\n  compile 'com.arakelian:json-filter:4.0.1'\n}\n```\n\n## Licence\n\nApache Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farakelian%2Fjson-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farakelian%2Fjson-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farakelian%2Fjson-filter/lists"}