本文整理了Java中com.google.gson.JsonArray.isJsonNull()
方法的一些代码示例,展示了JsonArray.isJsonNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonArray.isJsonNull()
方法的具体详情如下:
包路径:com.google.gson.JsonArray
类名称:JsonArray
方法名:isJsonNull
暂无
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The URI setter.
*
* @param uris Optional. A JSON array of the Spotify track URIs to play.
* @return A {@link StartResumeUsersPlaybackRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a>
*/
public Builder uris(final JsonArray uris) {
assert (uris != null);
assert (!uris.isJsonNull());
return setBodyParameter("uris", uris);
}
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The album IDs setter.
*
* @param ids Optional. A json array consisting of the Spotify IDs. Maximum: 50 IDs.
* @return A {@link SaveAlbumsForCurrentUserRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a>
*/
public Builder ids(final JsonArray ids) {
assert (ids != null);
assert (!ids.isJsonNull());
assert (ids.size() <= 50);
return setBodyParameter("ids", ids);
}
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The track IDs setter.
*
* @param ids Optional. A json array consisting of the Spotify IDs. Maximum: 50 IDs.
* @return A {@link SaveTracksForUserRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a>
*/
public Builder ids(final JsonArray ids) {
assert (ids != null);
assert (!ids.isJsonNull());
assert (ids.size() <= 50);
return setBodyParameter("ids", ids);
}
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The track URIs setter.
* <p>
* <b>Note:</b> If the URIs already have been set with {@link #uris(String)}, any URIs listed here will be ignored.
*
* @param uris Optional. A JSON array of the Spotify track URIs to add. maximum: 100 track URIs.
* @return An {@link AddTracksToPlaylistRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a>
*/
public Builder uris(final JsonArray uris) {
assert (uris != null);
assert (!uris.isJsonNull());
assert (uris.size() <= 100);
return setBodyParameter("uris", uris);
}
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The track URIs setter.
* <p>
* <b>Note:</b> If the URIs have already been set with {@link #uris(String)}, any URIs set here will be ignored.
*
* @param uris Optional. A JSON array of Spotify track URIs to set. Maximum: 100 track URIs.
* @return A {@link ReplacePlaylistsTracksRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a>
*/
public Builder uris(final JsonArray uris) {
assert (uris != null);
assert (!uris.isJsonNull());
assert (uris.size() <= 100);
return setBodyParameter("uris", uris);
}
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The user or artist IDs setter.
*
* @param ids Optional. A json array of the artist or the user Spotify IDs. A maximum of 50 IDs can be
* sent in one request.
* @return A {@link FollowArtistsOrUsersRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify URIs & IDs</a>
*/
public Builder ids(final JsonArray ids) {
assert (ids != null);
assert (!ids.isJsonNull());
assert (ids.size() <= 50);
return setBodyParameter("ids", ids);
}
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The device ID setter.
*
* @param device_ids Required. A JSON array containing the ID of the device on which playback should be
* started/transferred. <b>Note:</b> Although an array is accepted, only a single
* {@code device_id} is currently supported.
* @return A {@link TransferUsersPlaybackRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a>
*/
public Builder device_ids(final JsonArray device_ids) {
assert (device_ids != null);
assert (!device_ids.isJsonNull());
assert (device_ids.size() == 1);
return setBodyParameter("device_ids", device_ids);
}
代码示例来源:origin: thelinmichael/spotify-web-api-java
/**
* The track URIs setter.
* <p>
* There are several ways to specify which tracks to remove, determined by the request parameters.
* Removing all occurrences of specific tracks: <br>
* {@code [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" },
* {"uri": "spotify:track:1301WleyT98MSxVHPZCA6M" }] } <br>
* Removing a specific occurrence of a track: <br>
* {@code [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "positions": [0,3] },
* { "uri": "spotify:track:1301WleyT98MSxVHPZCA6M", "positions": [7] }] }
*
* @param tracks Required. An array of objects containing Spotify URIs of the tracks to remove. A maximum of
* 100 objects can be sent at once
* @return A {@link RemoveTracksFromPlaylistRequest.Builder}.
* @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a>
*/
public Builder tracks(final JsonArray tracks) {
assert (tracks != null);
assert (!tracks.isJsonNull());
assert (tracks.size() <= 100);
return setBodyParameter("tracks", tracks);
}
代码示例来源:origin: antest1/kcanotify
JsonObject stage1_data = data.getAsJsonObject("api_stage1");
JsonArray touch_plane = stage1_data.getAsJsonArray("api_touch_plane");
if (touch_plane != null && !touch_plane.isJsonNull()) {
int friend_contact = touch_plane.get(0).getAsInt();
if (friend_contact != -1) {
代码示例来源:origin: binarywang/WxJava
List<Integer> funcInfo = new ArrayList<>();
JsonArray jsonArray = GsonHelper.getAsJsonArray(jsonObject.get("func_info"));
if (jsonArray != null && !jsonArray.isJsonNull()) {
for (int i = 0; i < jsonArray.size(); i++) {
jsonObject = jsonArray.get(i).getAsJsonObject();
内容来源于网络,如有侵权,请联系作者删除!