summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/utils/JsonUtils.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-01-04 08:42:54 -0500
committerJames Moger <james.moger@gitblit.com>2012-01-04 08:42:54 -0500
commitdf162cdbdfeb5fbf5500546c9783e1685be6980f (patch)
treebc3df2a3803387023a967ca4fe27767c6c9c84b6 /src/com/gitblit/utils/JsonUtils.java
parent0ea17fc294c1bb55a90037a150f4624992c0e9fb (diff)
downloadgitblit-df162cdbdfeb5fbf5500546c9783e1685be6980f.tar.gz
gitblit-df162cdbdfeb5fbf5500546c9783e1685be6980f.zip
Federation pull_scripts request. Documentation.
Diffstat (limited to 'src/com/gitblit/utils/JsonUtils.java')
-rw-r--r--src/com/gitblit/utils/JsonUtils.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/gitblit/utils/JsonUtils.java b/src/com/gitblit/utils/JsonUtils.java
index 3cb43eb1..da9c99d2 100644
--- a/src/com/gitblit/utils/JsonUtils.java
+++ b/src/com/gitblit/utils/JsonUtils.java
@@ -108,6 +108,19 @@ public class JsonUtils {
UnauthorizedException {
return retrieveJson(url, type, null, null);
}
+
+ /**
+ * Reads a gson object from the specified url.
+ *
+ * @param url
+ * @param type
+ * @return the deserialized object
+ * @throws {@link IOException}
+ */
+ public static <X> X retrieveJson(String url, Class<? extends X> clazz) throws IOException,
+ UnauthorizedException {
+ return retrieveJson(url, clazz, null, null);
+ }
/**
* Reads a gson object from the specified url.