# resource handling and loading for events

This commit is contained in:
Lukas Niemeier committed 2013-01-30 18:43:37 +01:00
1 parent 3de188f98b
commit 594acb1743
13 files changed
+175 -133

No files matched your search

@@ -7,6 +7,15 @@ import com.sap.sailing.server.gateway.deserialization.JsonDeserializationExcepti
public class Helpers {
public static JSONArray toJSONArraySafe(Object object)
throws JsonDeserializationException {
if (object instanceof JSONArray) {
return (JSONArray) object;
}
throw new JsonDeserializationException(
String.format("Expected a JSONArray, got %s.", object.getClass().getName()));
}
public static JSONObject toJSONObjectSafe(Object object)
throws JsonDeserializationException {
if (object instanceof JSONObject) {