0

I got the following response from the server using Java

{"success":true,"errors":[],"requestId":"blah blah","warnings":[],"result":[{"id":1023,"name":"Email","description":"", subject":{"type":"Text","value":"Some value"}}]

I want to access the id and subject's -> value. Thanks in advance.

1 Answers1

0

You can use this library

JacksonXML

To parse this JSON response to Java object, and next validate it, in your custom conditions.

There are also similar libraries like gson from Google or Xpath. I recommend Jackson because Spring framework use this and it's very easy to use in production grade.

merc-angel
  • 394
  • 1
  • 5
  • 13