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