I have following input JSON string which I want to convert to JSON Object.
{
"myId": "SN001",
"field2": "PM4334",
"field3": "76.99",
"field4": "2.0",
"values": "0,1,2,3,4,5,6,7,8,9"
}
However I am getting following error while conversion using Gson library in my Java program.
com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 150 path $.1
Requesting you to help me in this case.
Additional details
String inputMsg = inputMsgObj.toString();
Gson gson = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
DeviceMessage msg = gson.fromJson(inputMsg, DeviceMessage.class);
Getting the error message at third line while converting the message to DeviceMessage