Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
So I had a similar job working, but replaced the tRest component with the tRestClient component there now. The structure of the JSON response I get back also changed. The Payload actually has a payload section, which is what I really want to get to, but for the sake of trying to solve the immediate problem, I focused on trying to get access to the first layer of the message. "$.payload.results.maxshTimestamp" is the query that worked in the previous setup, with the tRest component and slightly different response message. I attempt to print out the contents of the 4 variables those queries are ties to in the third picture. The first three are null but the 4th (root) is printed out fine. I've tried various JSONpath syntaxes but anything other than $/@ is printed out as null.
Is there something I've misconfigured/misunderstood? Or is what I'm attempting not possible, or is there a preferred way to achieve a similar result?
tRESTClient passes response to tExtractJSONFields, the tJave at the end just logs info with System.out.println
The three null's map to the non $ Jsonpath queries
Seems the tRestClient was passing on the response as xml even though I had chosen JSON. Changed to tExtractXMLField and using path instead of jsonpath and it worked fine.