JSON is a portable format in a way that any language with an appropriate parser can serialize/deserialize it to/from objects; Java is no different.
Regarding Java specifically, you're going to have to choose a framework that does this for you (You could do it manually, but that's plain tedious ;) ). I can recommend Spring Boot since it is pretty easy to get started with. Spring Boot = Consume REST Api is a good place to start.
To answer your question specifically, you need to create POJO's (Data Transfer Objects - DTO's in this case) that maps to the JSON. The way I go about it is I take an example response and create my classes that way.
Log in to comment