JSON

In this blog post, I will share the Spring annotations used to map HTTP requests to specific handler methods. These annotations include @PostMapping, @GetMapping, @PutMapping, and @DeleteMapping. While most Spring Boot applications use the @RequestMapping annotation, which I will also cover in this post, I’ll begin with the newer shortcut annotations that have been available…

Read More Spring Annotations @PostMapping, @GetMapping, @PutMapping and @DeleteMapping

Learning how to convert Java objects into JSON and vice versa can be very helpful for your work as a full-stack mobile app developer. In this blog post, I will share some code examples that will help you with the most common tasks you’ll encounter when working with JSON and Java. I will cover the…

Read More Convert Java into JSON and JSON into Java. All Possible Examples.

In this short tutorial, you will learn how to convert JSON string to a struct or a class in Swift. JSON String Let’s assume we have a web service endpoint which returns us a JSON string containing the following user details: {“firstName”:”Sergey”,”lastName”:”Kargopolov”,”email”:”[email protected]”,”userId”:”7fc0631b-7116-4d41-8d87-78f97b4dc543″} Swift Data Structure. Conforming to Codable or Encodable. We need to write Swift code…

Read More Convert JSON to Swift Class or Struct

This tutorial will teach you how to make your RESTful Spring Boot API endpoint respond with either XML or JSON representation. The client application can request our API endpoint to respond with JSON or XML by including a special HTTP Header called Accept. As a value, the Accept HTTP Header will have either application/json or application/xml. …

Read More Return XML or JSON in Spring Boot Web Service

In this Spring Boot REST tutorial, you will learn how to use the @PostMapping annotation to make your RESTful Web Service Endpoint able to handle HTTP Post requests and read its JSON or XML body payload. If you are also interested in using @GetMapping, @PutMapping and @DeleteMapping annotations, check the following tutorial “@PostMapping, @GetMapping, @PutMapping,…

Read More @PostMapping and @RequestBody Example in Spring Boot REST

In this blog post I am going to share with you a way to create a RESTful Web Service to: Create a new user profile, Generate and save in database a user secure user password rather than an actual password provided by user, Return back as a response a custom user profile object(JSON) with information that…

Read More RESTful Web Service to Save a New User in Database

Hibernate is a great framework to use to persist data into a database when building RESTful Web Services for your mobile application with Jersey and JAX-RS. In most of the projects I have participated when designing RESTful Web Services for Mobile App we used MySQL database server and Hibernate framework to store user data which…

Read More Persist Java Object in MySQL Database With Hibernate