0

I have a class which sends the response for a request received. I have pasted the response below. I want to remove the [] brackets in the starting and the ending of the response.

[{ "Status": "Success", "Message": "Booking Update received" }]

Request for a suggestion to remove the brackets.

  • Is this a custom response created by yourself – Reshma Jun 7 '18 at 8:32
  • That appears to be JSON which is generally a good format to send structured data in. It is an array of objects, so if there is only ever one object you could just serialize that not the array. – Keith C Jun 7 '18 at 8:34
0

use string methods to remove the brackets.

yourstringName.substirng(1,yourstringName.length()-1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.