I am not sure how that would be different from JsonElement.toString().
Here are a couple use cases I don't know how to do in GSON.
1)
String json =
"{\"description\":\"A person\", \"type\":\"object\",
\"properties\": { \"name\": {\"type\":\"string\"}, \"born\" : {\"type
\":[\"integer\",\"string\"], \"minimum\":1900, \"maximum\":2010,
\"format\":\"date-time\", \"optional\":true}, \"gender\" : {\"type\":
\"string\", \"enum\":[\"male\",\"female\"], \"options\":[ {\"value\":
\"male\",\"label\":\"Guy\"}, {\"value\":\"female\",\"label\":\"Gal
\"}]}, \"address\" : {\"type\":\"object\" , \"properties\":{ \"street
\":{\"type\":\"string\"}, \"city\":{\"type\":\"string\"}, \"state\":
{\"type\":\"string\"} } } } }";
JsonObject jsonObject = new JsonObject(json);
2).
Foo foo = new Foo();
JsonObject jsonObject = new Gson().toJson(foo);
Jacob