0

I have a Java Hashmap as follows:

map.put("targetStatus","2");
map.put("targetAvailable","Availability=false")

I am using Gson library to convert the map into Json :

Gson gson = new Gson();
String jsonString = gson.toJson(map);

Output

{
"map": {
 "targetStatus": "2",
  "targetAvailable": "Availability\u003dfalse"
  }
}

Could someone help me out, why is the = sign not displayed when converted to json. Thanks in advance!

  • @fluffy Thanks !That worked! – Kashish Mukheja Dec 03 '20 at 22:01
  • 1
    Does this answer your question? [Can you avoid Gson converting "<" and ">" into unicode escape sequences?](https://stackoverflow.com/questions/4147012/can-you-avoid-gson-converting-and-into-unicode-escape-sequences) – Marcono1234 Dec 04 '20 at 17:00

0 Answers0