Remove double quotes from JSON String

gaity :

I've below JSON string:

{ "students" : "[  {\"studentId\" : \"A1\",\"studentNumber\" 
 : \"287\",\"studentType\" : \"FullTime\"} ]"  }

In order to deserialize this string in java object, I've to remove \ which can be done using string replace method. Apart from that there are double quotes also just before [ and after ]. how do I remove these double quotes or allow them while deserializeing using Jackson.

Abhishek Patyal :

Try to replace "[ with [ and ]" with ]

json = json.replaceAll("\"\\[","[");
json = json.replaceAll("\\]\"", "]");

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

JSON string from Gson: remove double quotes

Remove double quotes from JSON string value

How to remove double quotes from a string inside JSON string?

remove double quotes from json string using sed

Remove double quotes from JSON.SerializeObject string property

Couldn't able to remove double quotes from json string

how to remove backslashes and double quotes in json string

remove escaped double quotes from string golang

To remove double quotes from date string in SQL

Remove double quotes from part of string JQ

Cannot remove double quotes from string PHP

How to remove single or double quotes from a string?

Remove Double Quotes from JSON Property

Remove double quotes from json object in Postgres

how to remove double quotes from json

PHP is struggling to remove part of JSON string that contains double quotes

Remove double quotes inside quotes of string

How to remove double quotes from default string in javascript/Jquery

to replace or remove double,single quotes from string in php/jquery

How can I remove double quotes from a string

To remove double quotes from vector<string> c++ 98

Remove double quotes from json on specific key value

Is there a way to remove double quotes from numerical values within a .json file?

How to remove double quotes from a JSON response in javascript?

How to remove double quotes from json_encode in php?

(PowerShell) How to remove double quotes from the JSON output?

Remove double quotes from text inside JSON using Python and Regex

remove double quotes from field

Remove double quotes from dictionary