public class JsonUtils {
+ private JsonUtils() {
+
+ }
+
public static String toString(JsonElement jsonElement) {
if (jsonElement == null) {
return null;
}
public static boolean isEmptyJson(final JsonElement json) {
+ if (json == null || json.isJsonNull()) {
+ return true;
+ }
if (json.isJsonArray()) {
return json.getAsJsonArray().isEmpty();
}