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.
Try to replace "[
with [
and ]"
with ]
json = json.replaceAll("\"\\[","[");
json = json.replaceAll("\\]\"", "]");
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments