本文整理汇总了C#中JsonObject.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# JsonObject.GetString方法的具体用法?C# JsonObject.GetString怎么用?C# JsonObject.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JsonObject
的用法示例。
在下文中一共展示了JsonObject.GetString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
public static GitHubCommitFile Parse(JsonObject obj) {
if (obj == null) return null;
// Parse the file status
GitHubCommitFileStatus status;
string strStatus = obj.GetString("status");
switch (strStatus) {
case "added": status = GitHubCommitFileStatus.Added; break;
case "modified": status = GitHubCommitFileStatus.Modified; break;
case "renamed": status = GitHubCommitFileStatus.Renamed; break;
case "removed": status = GitHubCommitFileStatus.Removed; break;
default: throw new Exception("Unknown status \"\" - please create an issue it can be fixed https://github.com/abjerner/Skybrud.Social/issues/new");
}
return new GitHubCommitFile(obj) {
Filename = obj.GetString("filename"),
Additions = obj.GetInt32("additions"),
Deletions = obj.GetInt32("deletions"),
Changes = obj.GetInt32("changes"),
Status = status,
RawUrl = obj.GetString("raw_url"),
BlobUrl = obj.GetString("blob_url"),
Patch = obj.GetString("patch")
};
}
示例2: Parse
public static TwitterReverseGeocodeQuery Parse(TwitterReverseGeocodeResults results, JsonObject obj) {
return new TwitterReverseGeocodeQuery(obj) {
Results = results,
Url = obj.GetString("url"),
Type = obj.GetString("type")
};
}
示例3: Parse
public static InstagramIdBasedPagination Parse(JsonObject obj) {
if (obj == null) return null;
return new InstagramIdBasedPagination(obj) {
NextUrl = obj.GetString("next_url"),
NextMaxId = obj.GetString("next_max_id")
};
}
示例4: Parse
public static VimeoUrl Parse(JsonObject obj) {
if (obj == null) return null;
return new VimeoUrl(obj) {
Type = obj.GetString("type"),
Content = obj.GetString("_content")
};
}
示例5: Parse
public static FacebookCursors Parse(JsonObject obj) {
if (obj == null) return null;
return new FacebookCursors(obj) {
After = obj.GetString("after"),
Before = obj.GetString("before")
};
}
示例6: Parse
public static FacebookObject Parse(JsonObject obj) {
if (obj == null) return null;
return new FacebookObject(obj) {
Id = obj.GetString("id"),
Name = obj.GetString("name")
};
}
示例7: Parse
public static InstagramLikedMediaPagination Parse(JsonObject obj) {
if (obj == null) return null;
return new InstagramLikedMediaPagination(obj) {
NextUrl = obj.GetString("next_url"),
NextMaxLikeId = obj.GetString("next_max_like_id")
};
}
示例8: Parse
public static GitHubCommitTree Parse(JsonObject obj) {
if (obj == null) return null;
return new GitHubCommitTree(obj) {
Sha = obj.GetString("sha"),
Url = obj.GetString("url")
};
}
示例9: Parse
public static FacebookPaging Parse(JsonObject obj) {
// TODO: Should we just return NULL if "obj" is NULL?
if (obj == null) return new FacebookPaging(null);
return new FacebookPaging(obj) {
Previous = obj.GetString("previous"),
Next = obj.GetString("next")
};
}
示例10: Parse
public static GitHubCommitParent Parse(JsonObject obj) {
if (obj == null) return null;
return new GitHubCommitParent(obj) {
Sha = obj.GetString("sha"),
Url = obj.GetString("url"),
HtmlUrl = obj.GetString("html_url")
};
}
示例11: Parse
public static FacebookCursorBasedPagination Parse(JsonObject obj) {
if (obj == null) return null;
return new FacebookCursorBasedPagination(obj) {
Cursors = obj.GetObject("cursors", FacebookCursors.Parse),
Previous = obj.GetString("previous"),
Next = obj.GetString("next")
};
}
示例12: Parse
public static FacebookPaging Parse(JsonObject obj) {
FacebookPaging paging = new FacebookPaging();
if (obj != null) {
paging.Previous = obj.GetString("previous");
paging.Next = obj.GetString("next");
}
return paging;
}
示例13: Parse
public static GitHubCommitAuthor Parse(JsonObject obj) {
if (obj == null) return null;
return new GitHubCommitAuthor(obj) {
Name = obj.GetString("name"),
Email = obj.GetString("email"),
Date = obj.GetDateTime("date")
};
}
示例14: Parse
public static FacebookPostPhotoSummary Parse(JsonObject obj) {
if (obj == null) return null;
return new FacebookPostPhotoSummary(obj) {
Id = obj.GetString("id"),
PostId = obj.GetString("post_id")
};
}
示例15: Parse
public static GoogleAccessTokenResponse Parse(JsonObject obj) {
return new GoogleAccessTokenResponse {
AccessToken = obj.GetString("access_token"),
RefreshToken = obj.GetString("refresh_token"),
ExpiresIn = TimeSpan.FromSeconds(obj.GetInt32("expires_in")),
TokenType = obj.GetString("token_type")
};
}