Spring API application/json is not working when getting text/json content type -


i'm querying phraseapp api translations , setting content type on headers appplication/json:

httpheaders requestheaders = new httpheaders(); requestheaders.setaccept(arrays.aslist(mediatype.application_json)); 

but api sends response attachment content type text/json; charset=utf-8. , spring raises error:

org.springframework.web.client.restclientexception: not extract response: no suitable httpmessageconverter found response type [class java.lang.string] , content type [text/json;charset=utf-8] 

the response in following form:

{   "some.key.a": "some translation a",   "some.key.b": "some translation b",   "some.key.c": "some translation c" ... } 

i expected assign response string variable , parse later. idea on going wrong here ? thank you.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -