+ throw new CrudException("Unable to transform response: " + jsonObject.toString(), javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR);
+ }
+
+ return builder.build();
+ }
+
+ public static List<Vertex> collectionFromJson(String jsonString, String version) throws CrudException {
+ List<Vertex> result = new ArrayList<>();
+ JSONArray array = new JSONArray(jsonString);
+
+ for (Object jsonObject : array) {
+ result.add(Vertex.fromJson((JSONObject)jsonObject, version));