Consume REST JSON webservices easily using Spring Web!

Spring made it very easy to consume JSON webservices. In this article I describe how to receive and parse JSON and how to send your Java objects as JSON.

First we need to include the required dependencies. If you use maven, include the following dependencies:

Spring web has a RestTemplate class which can be used to call the REST webservices. The Jackson dependency supplies a message converter class which can be used to send and receive Java objects which are automatically converted to JSON en reversed from JSON.

Continue reading