Are you getting error “Expected BEGIN_OBJECT but was STRING at line 1 column 1” while parsing Json String to Json Object using Google gson library ?
It is very common that Java web services receives JSON string. If you wanted to convert JSON string to Jsonobject using Google Gson then there are two ways to achieve this. JSON string to JsonObject Example Google Gson is a… Read More!
When you deal with json object you may want to check whether key exists in the jsonobject before fetching value for that key. We can easily check using Google gson JsonObject has() method. has() method – Class JsonObject This is… Read More!