code: private static void parseTarget(ArrayList<Shape> shapes,
                                      JSONObject modelJSON,
                                      Shape current) throws JSONException {
          if (modelJSON.has("target")) {
              JSONObject targetObject = modelJSON.getJSONObject("target");
              if (targetObject.has("resourceId")) {
                  current.setTarget(getShapeWithId(targetObject.getString("resourceId"),
                                                   shapes));
              }
          }
      }
docs: parse the target resource and add it to the current shape
  @param shapes
  @param modelJSON
  @param current
  @throws org.json.JSONException