0

Calling the endpoint from a browser returns back my set

[ {"prop1" : "A"}, {"prop1" : "B"} ]

The weird thing happens when I call this via resttemplate, it comes back as {"endpointPath": [ {"prop1" : "A"}, {"prop1" : "B"} ] } The endpoint path is endpoint-path, but somehow in the json is camel-cased. The call is like this:

config.restTemplate.exchange(uri, HttpMethod.GET, null, typeRef).body

where typeRef is = object : ParameterizedTypeReference<Set<MyPojo>>() {}

I don't know why this happens. Do you?

BadChanneler
  • 1,450
  • 1
  • 12
  • 20
  • @s1m0nw1 I don't really see how that answers my question, can you please explain? What I say here is that the resttemplate call modifies the structure of the json received, I expect a set, and I get a a set within a json object. – BadChanneler May 31 '19 at 09:30
  • Alright, I guess I misread the question a bit, reopened it – s1m0nw1 May 31 '19 at 10:41

0 Answers0