{"id":20903735,"url":"https://github.com/mihajlonesic/json-serialization","last_synced_at":"2026-06-19T01:30:57.875Z","repository":{"id":107263913,"uuid":"252658431","full_name":"MihajloNesic/json-serialization","owner":"MihajloNesic","description":"Example of a simple library for JSON serialization with Java Reflection API ","archived":false,"fork":false,"pushed_at":"2021-04-07T22:17:43.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T16:35:26.198Z","etag":null,"topics":["annotation","java-reflection-api","json-serialization"],"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/MihajloNesic.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":"2020-04-03T07:12:15.000Z","updated_at":"2024-09-16T21:18:53.000Z","dependencies_parsed_at":"2023-03-24T01:47:48.417Z","dependency_job_id":null,"html_url":"https://github.com/MihajloNesic/json-serialization","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MihajloNesic/json-serialization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MihajloNesic%2Fjson-serialization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MihajloNesic%2Fjson-serialization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MihajloNesic%2Fjson-serialization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MihajloNesic%2Fjson-serialization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MihajloNesic","download_url":"https://codeload.github.com/MihajloNesic/json-serialization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MihajloNesic%2Fjson-serialization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34514282,"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-18T02:00:06.871Z","response_time":128,"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":["annotation","java-reflection-api","json-serialization"],"created_at":"2024-11-18T13:14:46.662Z","updated_at":"2026-06-19T01:30:57.823Z","avatar_url":"https://github.com/MihajloNesic.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JSON Serialization with Java Reflection API\n\n### Features\n* _@JsonSerializable_ - Class annotation to mark class as json serializable\n* _@JsonElement_ - Field annotation to mark field as json serializable. Can have an alias and can be marked as required (only for Objects)\n* _@JsonInit_ - Method annotation. The method will execute before the json is constructed\n\n### Can serialize\n* primitives and wrapper classes\n* arrays\n* collections (lists, sets)\n* objects\n* maps\n\n### Example\n\n```java\n@JsonSerializable\npublic class Student {\n\n    @JsonElement\n    private String firstName;\n\n    @JsonElement\n    private String lastName;\n\n    @JsonElement(required = false)\n    private String middleName;\n\n    public Student(String firstName, String lastName) {\n        this.firstName = firstName;\n        this.lastName = lastName;\n    }\n}\n```\n\n```java\nStudent student = new Student(\"John\", \"Doe\");\nString jsonString = JsonConverter.convertToJson(student);\nSystem.out.println(jsonString);\n```\n\nOutput\n```json\n{\"firstName\": \"John\", \"lastName\": \"Doe\"}\n```\n\n---\n\nSee tests for full examples","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihajlonesic%2Fjson-serialization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmihajlonesic%2Fjson-serialization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihajlonesic%2Fjson-serialization/lists"}