How to initialise an array in Java

In this post we will provide a few examples on how to initialise an array in Java. Single dimensional array: Below are some examples on how to initialise a single dimensional array including initialise an array in one line.

Multi dimensional array: Below are some examples on how to initialise a … Continue reading How to initialise an array in Java

Validate a AWS Cognito JWT token

In this post we will provide an example on how to validate a AWS cognito JWT token. Setup: You will need to add the following dependancies to your project:

Validate a AWS cognito JWT token: AWS cognito tokens are signed by a private key, the public key is normally available via the user pool … Continue reading Validate a AWS Cognito JWT token

Java PUT request using Unirest

In this post we will provide some examples on how to make a PUT request using Unirest. Unirest is a lightweight and readable HTTP java client. Setup: You will need to add the following dependency:

Put request using Unirest: Below ¬†are two examples on how to make a REST API call using Unirest, the … Continue reading Java PUT request using Unirest

Java POST request using Unirest

In this post we will provide an example on how to make a POST request using Unirest. Setup: You will need to add the following dependency to your maven project

POST request using Unirest: Below is a simple example on how to send a HTTP Post request.

As you can see the Unirest … Continue reading Java POST request using Unirest

Java GET request using Unirest

In this post we will provide examples of how to make a GET request using Unirest. Unirest is an increasingly popular HTTP client library, with a great API making your code very readable. Setup: You will need to add the following dependency to your maven project

GET request using Unirest: The examples below include … Continue reading Java GET request using Unirest

Convert JSON to a Map using Jackson

In this post we will demonstrate how to convert JSON to a Map using Jackson. Setup: You will need to add the following dependancy to your project.

Convert JSON to a Map using Jackson: The example below shows how to convert a JSON string to a Java Map using Jackson.

The main class … Continue reading Convert JSON to a Map using Jackson

Convert JSON to Map using Jackson

In this post we will provide an example of how to convert JSON to a Map using Jackson. Setup: You will need to add the following dependancy to your project (to include the Jackson library)

Convert JSON to Map: The following example shows how to convert JSON to a Map using the ObjectMapper class. … Continue reading Convert JSON to Map using Jackson