{"id":22189395,"url":"https://github.com/davenaugler/unit_14_restjson","last_synced_at":"2026-05-10T19:04:45.864Z","repository":{"id":215174728,"uuid":"738298685","full_name":"davenaugler/Unit_14_RestJSON","owner":"davenaugler","description":"This is a description","archived":false,"fork":false,"pushed_at":"2024-01-17T20:46:16.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T02:46:06.834Z","etag":null,"topics":["jackson-databind","java","maven","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davenaugler.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}},"created_at":"2024-01-02T22:53:15.000Z","updated_at":"2024-01-17T16:44:22.000Z","dependencies_parsed_at":"2024-01-10T01:06:19.041Z","dependency_job_id":null,"html_url":"https://github.com/davenaugler/Unit_14_RestJSON","commit_stats":null,"previous_names":["davenaugler/unit_14-rest-json"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davenaugler%2FUnit_14_RestJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davenaugler%2FUnit_14_RestJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davenaugler%2FUnit_14_RestJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davenaugler%2FUnit_14_RestJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davenaugler","download_url":"https://codeload.github.com/davenaugler/Unit_14_RestJSON/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245343981,"owners_count":20599867,"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":["jackson-databind","java","maven","spring-boot"],"created_at":"2024-12-02T11:17:50.968Z","updated_at":"2026-05-10T19:04:40.822Z","avatar_url":"https://github.com/davenaugler.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unit_14-Rest-JSON\n\n## 01 - JSON\n- Created `JsonExample.java` and broke down how JSON looks and how it is structured.\n- JSON is based on Key Value pairs\n- Objects are represented by curly brackets `{}`\n- Arrays are represented by square brackets `[]`\n\n## 02 - Converting JSON Strings to Java and Back\n- Downloading someone else's code. In this case it's within our Spring-Boot Maven project (Jackson databind).\n- Task: Take a Java Object and convert it into a JSON String and then visa versa\n   - Used [Jackson databind](https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind) to perform the local lifecycle of a JSON String, modify the JSON, and ouput the JSON String\n\n## 03 - Sending Data to Java via Post Request\n- Learned to pass data from a web request, using Postman\n- Put `@RequestParam`'s within the `createPerson` class.\n   - Made `gender` optional by adding `@RequestParam(required = false)`\n- Status: 200 OK\n- Doing it this way we sent `name`, `age`, and `gender` via Query Params through the ULR\n- Doing this exposes our data\n  - **Pros:** Quick and easy, stateless, and there's no need for session management\n  - **Cons:** Security risks, data size limitations, caching issues, and unpleasant user experience \n\n\n## 04 - Omitting RequestParam Annotation\n- Removed the `@RequestParam` annotations within the `createPerson` class\n- Class still successfully runs and returns us our object as it did before within the URL\n- Feature of doing it this way is that you can not specify required fields.\n   - Doing it this way, none of the fields within the `createPerson` class are required. \n   - So if you leave out `age` it's totally fine and returns `age` as null\n- Status: 200 OK\n\n## 05 - Request Header and Body\n- Learning the difference between sending data via URL and sending data within the Body of the request via POST \n  - GET Request: Getting data from the server to HTML\n  - POST Request: Sending data from HTML to the server (using the Body of the Post request to send the data)\n\n## 06 - Path Variables\n- Sending path variables through GET request using Postman\n\n## 07 - Mocking a Repository\n- Come back to\n\n## 08 - Rest Calls with Spring\n- Went to [Alpha Vantage](https://www.alphavantage.co/) to play with their free API Key\n- Reviewed their documentation\n\n## 09 - Mapping JSON Response to Java Objects","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavenaugler%2Funit_14_restjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavenaugler%2Funit_14_restjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavenaugler%2Funit_14_restjson/lists"}