Best way to parse response from /_nodes/stats API using java

I am trying to write a java program which frequently calls the /_nodes/stats endpoint and other metrics endpoints and plot them. What is the best way to parse the output from above endpoints and extract specific data from them?

Not sure about the question or a question within the question? What is stopping you from parsing the JSON response? Apart from that maybe the rest high level client makes it easier for your to not parse everything yourself.