code: public static String fetchNextSkiptoken(JSONObject jsonObject) throws Exception {
          String skipToken = "";
          // Parse the skip token out of the string.
          skipToken = jsonObject.optJSONObject("responseMsg").optString("odata.nextLink");
  
          if (!skipToken.equalsIgnoreCase("")) {
              // Remove the unnecessary prefix from the skip token.
              int index = skipToken.indexOf("$skiptoken=") + (new String("$skiptoken=")).length();
              skipToken = skipToken.substring(index);
          }
          return skipToken;
      }
docs: This method parses the skip token from a json formatted string.
  
  @param jsonData
  The JSON Formatted String.
  @return The skipToken.
  @throws Exception