how to convert object to json in java using gson code example
Example: java gson string to json
JsonObject convertedObject = new Gson().fromJson(json, JsonObject.class);
JsonObject convertedObject = new Gson().fromJson(json, JsonObject.class);