Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Multiple conversion of json string in ObjectMapper  RSS feed

Ranch Hand
Posts: 123
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a web application, spring boot service.
I called a service of spring boot from my web application. The spring boot service return me a json given below.

[{"createdby":"ats","updatedby":"ats","createddate":"2019-04-01 09:27:03","updateddate":"2019-04-01 09:27:03","id":1,"address1":"ABC","address2":"STN","mobile":"111111111","email":"a@a.cp","status":false}]

When I pass this json string to UI from my web application, it again converts to array like.

[[{"createdby":"ats","updatedby":"ats","createddate":"2019-04-01 09:27:03","updateddate":"2019-04-01 09:27:03","id":1,"address1":"ABC","address2":"STN","mobile":"111111111","email":"a@a.cp","status":false}]]

THe web application also configure with @RestController and the web api also exposed.

I am using ObjectMapper class to convert the object to json string.

I have tried couple of things like

this.configure(SerializationFeature.WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS, false);

But it wont work.

Is there any way to not convert already converted array into another array.

Fire me boy! Cool, soothing, shameless self promotion:
global solutions you can do at home or in your backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!