{"id":21170184,"url":"https://github.com/subhashchandra-birajdar/springboot-rest-api-filtering","last_synced_at":"2026-05-18T03:07:08.129Z","repository":{"id":254939300,"uuid":"848019231","full_name":"Subhashchandra-Birajdar/SpringBoot-Rest-API-Filtering","owner":"Subhashchandra-Birajdar","description":"Static and Dynamic FIltering Rest-API in Spring Boot","archived":false,"fork":false,"pushed_at":"2024-08-27T02:12:08.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T17:27:40.313Z","etag":null,"topics":["api-filter","dynamic","filtering","rest-api","serialization","spring-boot","static"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Subhashchandra-Birajdar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-08-27T01:30:35.000Z","updated_at":"2024-08-27T02:12:11.000Z","dependencies_parsed_at":"2024-08-27T03:46:51.178Z","dependency_job_id":"d5dfbd43-e4b5-465e-80b8-d60ece8843d0","html_url":"https://github.com/Subhashchandra-Birajdar/SpringBoot-Rest-API-Filtering","commit_stats":null,"previous_names":["subhashchandra-birajdar/springboot-rest-api-filtering"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Subhashchandra-Birajdar/SpringBoot-Rest-API-Filtering","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhashchandra-Birajdar%2FSpringBoot-Rest-API-Filtering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhashchandra-Birajdar%2FSpringBoot-Rest-API-Filtering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhashchandra-Birajdar%2FSpringBoot-Rest-API-Filtering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhashchandra-Birajdar%2FSpringBoot-Rest-API-Filtering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Subhashchandra-Birajdar","download_url":"https://codeload.github.com/Subhashchandra-Birajdar/SpringBoot-Rest-API-Filtering/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhashchandra-Birajdar%2FSpringBoot-Rest-API-Filtering/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007604,"owners_count":26084334,"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-10-11T02:00:06.511Z","response_time":55,"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":["api-filter","dynamic","filtering","rest-api","serialization","spring-boot","static"],"created_at":"2024-11-20T15:56:50.725Z","updated_at":"2025-10-11T15:31:57.841Z","avatar_url":"https://github.com/Subhashchandra-Birajdar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filtering API\n\n* This project demonstrates how to implement dynamic filtering in a Spring Boot REST API using Jackson. It showcases how to control the serialization of JSON data based on runtime criteria, allowing flexible responses depending on user needs or request parameters.\n* This API demonstrates how to perform filtering on JSON responses in Spring Boot using both static and dynamic serialization.\n\n## Static Filtering\n\nStatic filtering involves excluding certain fields from the JSON response at either the class level or the field level. This means that these fields will always be excluded from the JSON serialization, regardless of the context.\n\n### Class-level Static Filtering\n\nAt the class level, static filtering can be applied using Jackson's `@JsonIgnoreProperties` annotation. This annotation allows you to specify fields to be ignored during serialization for all instances of the class.\n\n### Field-level Static Filtering\ndynamic filtering in a Spring Boot REST API using Jackson. It showcases how to control the serialization of JSON data based on runtime criteria, allowing flexible responses depending on user needs or request parameters.\nAt the field level, static filtering can be applied using Jackson's `@JsonIgnore` annotation. This annotation allows you to specify individual fields to be ignored during serialization.\n\n### Note:\nMake sure to uncomment the `@JsonIgnoreProperties` or `@JsonIgnore` annotations as needed in the `Student` class to apply the desired static filtering behavior.\n\n## Dynamic Filtering\n\nDynamic filtering involves excluding certain fields from the JSON response based on runtime conditions. This allows for more flexibility as filtering can be applied selectively based on the request or other factors.\n\n## Features\n\n- **Dynamic JSON Filtering**: Use Jackson's `@JsonFilter` to include or exclude fields dynamically based on runtime conditions.\n- **Spring Boot Integration**: Integrates with Spring Boot to provide a RESTful API for managing and filtering `Student` data.\n- **Flexible Configuration**: Customize JSON responses based on user roles or specific requirements.\n  \n## Endpoints\n\n### `/filtering`\n\n- GET request to this endpoint returns a single `Student` object with filtering applied.\n- Filtering is applied to include only the \"name\" and \"city\" fields in the response.\n\n### `/filtering-list`\n\n- GET request to this endpoint returns a list of `Student` objects with filtering applied.\n- Filtering is applied to include only the \"name\" and \"mobile\" fields in the response.\n\nThis README provides detailed explanations of both static and dynamic filtering mechanisms in the API and how to use the provided endpoints. Adjust the content as needed for your specific project documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubhashchandra-birajdar%2Fspringboot-rest-api-filtering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubhashchandra-birajdar%2Fspringboot-rest-api-filtering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubhashchandra-birajdar%2Fspringboot-rest-api-filtering/lists"}