When i tried to convert Object
to json format using gson.toJson(myObject)
it gives me not standard json format
Output currently :
{\"objects\":[],\"type\":\"price\"}
what should i need is like this : {"objects":[],"type":"price"}
below how i convert my Object to json :
Gson gson = new Gson();
String dataJson = gson.toJson(MyObject);
System.out.println("LOG : " + dataJson);
My question is : How to make normal json format using Gson
? thanks.