当前位置: 首页>>代码示例>>C#>>正文


C# JsonObject.GetObject方法代码示例

本文整理汇总了C#中JsonObject.GetObject方法的典型用法代码示例。如果您正苦于以下问题:C# JsonObject.GetObject方法的具体用法?C# JsonObject.GetObject怎么用?C# JsonObject.GetObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JsonObject的用法示例。


在下文中一共展示了JsonObject.GetObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Parse

 public static InstagramTaggedUser Parse(JsonObject obj) {
     if (obj == null) return null;
     return new InstagramTaggedUser(obj) {
         Position = obj.GetObject("position", InstagramPosition.Parse),
         User = obj.GetObject("user", InstagramUserSummary.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:7,代码来源:InstagramTaggedUser.cs

示例2: Parse

 public static TwitterReverseGeocodeResults Parse(JsonObject obj) {
     if (obj == null) return null;
     TwitterReverseGeocodeResults results = new TwitterReverseGeocodeResults(obj);
     results.Result = obj.GetObject("result", x => TwitterReverseGeocodeResult.Parse(results, x));
     results.Query = obj.GetObject("query", x => TwitterReverseGeocodeQuery.Parse(results, x));
     return results;
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:7,代码来源:TwitterReverseGeocodeResults.cs

示例3: Parse

 /// <summary>
 /// Gets a post from the specified <var>JsonObject</var>.
 /// </summary>
 /// <param name="obj">The instance of <var>JsonObject</var> to parse.</param>
 public static FacebookPost Parse(JsonObject obj) {
     if (obj == null) return null;
     return new FacebookPost(obj) {
         Id = obj.GetString("id"),
         From = obj.GetObject("from", FacebookObject.Parse),
         Application = obj.GetObject("application", FacebookObject.Parse),
         Properties = obj.GetArray("properties", FacebookPostProperties.Parse) ?? new FacebookPostProperties[0],
         Caption = obj.GetString("caption"),
         Message = obj.GetString("message"),
         Description = obj.GetString("description"),
         Story = obj.GetString("story"),
         Picture = obj.GetString("picture"),
         Link = obj.GetString("link"),
         Source = obj.GetString("source"),
         Name = obj.GetString("name"),
         Icon = obj.GetString("icon"),
         Type = obj.GetString("type"),
         StatusType = obj.GetString("status_type"),
         ObjectId = obj.GetString("object_id"),
         CreatedTime = obj.GetDateTime("created_time"),
         UpdatedTime = obj.GetDateTime("updated_time"),
         Shares = obj.GetObject("shares", FacebookShares.Parse),
         Likes = obj.GetObject("likes", FacebookLikes.Parse),
         Comments = obj.GetObject("comments", FacebookComments.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:30,代码来源:FacebookPost.cs

示例4: Parse

 public static TwitterUserEntities Parse(JsonObject entities) {
     if (entities == null) return null;
     return new TwitterUserEntities {
         Url = entities.GetObject("url", TwitterUserUrlEntities.Parse),
         Description = entities.GetObject("description", TwitterUserDescriptionEntities.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:7,代码来源:TwitterUserEntities.cs

示例5: Parse

 public static InstagramVideoSummary Parse(JsonObject obj) {
     if (obj == null) return null;
     return new InstagramVideoSummary {
         LowResolution = obj.GetObject("low_resolution", InstagramMediaSummary.Parse),
         StandardResolution = obj.GetObject("standard_resolution", InstagramMediaSummary.Parse)
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:7,代码来源:InstagramVideoSummary.cs

示例6: Parse

 public static FacebookCommentsCollection Parse(JsonObject obj) {
     if (obj == null) return null;
     return new FacebookCommentsCollection(obj) {
         Data = obj.GetArray("data", FacebookComment.Parse),
         Paging = obj.GetObject("paging", FacebookCursorBasedPagination.Parse),
         Summary = obj.GetObject("summary", FacebookCommentsSummary.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:8,代码来源:FacebookCommentsCollection.cs

示例7: Parse

 /// <summary>
 /// Gets an instance of <var>FacebookFeedResponse</var> from the specified <var>JsonObject</var>.
 /// </summary>
 /// <param name="obj">The instance of <var>JsonObject</var> to parse.</param>
 public static FacebookFeedResponse Parse(JsonObject obj) {
     if (obj == null) return null;
     if (obj.HasValue("error")) throw obj.GetObject("error", FacebookException.Parse);
     return new FacebookFeedResponse {
         Data = obj.GetArray("data", FacebookFeedEntry.Parse),
         Paging = obj.GetObject("paging", FacebookPaging.Parse)
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:12,代码来源:FacebookFeedResponse.cs

示例8: Parse

 /// <summary>
 /// Gets an instance of <code>YouTubeChannel</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static YouTubeChannel Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubeChannel(obj) {
         Id = obj.GetString("id"),
         Snippet = obj.GetObject("snippet", YouTubeChannelSnippet.Parse),
         Statistics = obj.GetObject("statistics", YouTubeChannelStatistics.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:12,代码来源:YouTubeChannel.cs

示例9: Parse

 public static FacebookPhotosResponse Parse(JsonObject obj) {
     if (obj == null) return null;
     if (obj.HasValue("error")) throw obj.GetObject("error", FacebookException.Parse);
     return new FacebookPhotosResponse {
         Data = FacebookPhoto.ParseMultiple(obj.GetArray("data")),
         Paging = FacebookPaging.Parse(obj.GetObject("paging"))
     };
 
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:9,代码来源:FacebookPhotosResponse.cs

示例10: Parse

 /// <summary>
 /// Gets an instance of <code>YouTubePlaylistItem</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static YouTubePlaylistItem Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubePlaylistItem(obj) {
         Id = obj.GetString("id"),
         Snippet = obj.GetObject("snippet", YouTubePlaylistItemSnippet.Parse),
         ContentDetails = obj.GetObject("contentDetails", YouTubePlaylistItemContentDetails.Parse),
         Status = obj.GetObject("status", YouTubePlaylistItemStatus.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:13,代码来源:YouTubePlaylistItem.cs

示例11: Parse

 public static YouTubeVideoThumbnails Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubeVideoThumbnails(obj) {
         Default = obj.GetObject("default", YouTubeVideoThumbnail.Parse),
         Medium = obj.GetObject("medium", YouTubeVideoThumbnail.Parse),
         High = obj.GetObject("high", YouTubeVideoThumbnail.Parse),
         Standard = obj.GetObject("standard", YouTubeVideoThumbnail.Parse),
         MaxRes = obj.GetObject("maxres", YouTubeVideoThumbnail.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:10,代码来源:YouTubeVideoThumbnails.cs

示例12: Parse

 /// <summary>
 /// Gets an instance of <code>YouTubeVideo</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <var>JsonObject</var> to parse.</param>
 public static YouTubeVideo Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubeVideo(obj) {
         Id = obj.GetString("id"),
         Snippet = obj.GetObject("snippet", YouTubeVideoSnippet.Parse),
         ContentDetails = obj.GetObject("contentDetails", YouTubeVideoContentDetails.Parse),
         Status = obj.GetObject("status", YouTubeVideoStatus.Parse),
         Statistics = obj.GetObject("statistics", YouTubeVideoStatistics.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:14,代码来源:YouTubeVideo.cs

示例13: Parse

 /// <summary>
 /// Gets an instance of <code>YouTubeChannelSnippet</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static YouTubeChannelSnippet Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubeChannelSnippet(obj) {
         Title = obj.GetString("title"),
         Description = obj.GetString("description"),
         PublishedAt = obj.GetDateTime("publishedAt"),
         Thumbnails = obj.GetObject("thumbnails", YouTubeChannelThumbnails.Parse),
         Localized = obj.GetObject("localized", YouTubeChannelLocalized.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:14,代码来源:YouTubeChannelSnippet.cs

示例14: Parse

 public static GitHubCommitDetails Parse(JsonObject obj) {
     if (obj == null) return null;
     return new GitHubCommitDetails(obj) {
         Author = obj.GetObject("author", GitHubCommitAuthor.Parse),
         Committer = obj.GetObject("committer", GitHubCommitAuthor.Parse),
         Message = obj.GetString("message"),
         Tree = obj.GetObject("tree", GitHubCommitTree.Parse),
         Url = obj.GetString("url"),
         CommentCount = obj.GetInt32("comment_count")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:11,代码来源:GitHubCommitDetails.cs

示例15: Parse

 /// <summary>
 /// Parses the specified <code>JsonObject</code> and returns an instance of <code>BitBucketCommit</code> if
 /// successful.
 /// </summary>
 /// <param name="obj">The <code>JsonObject</code> representing the user.</param>
 public static BitBucketCommit Parse(JsonObject obj) {
     if (obj == null) return null;
     return new BitBucketCommit(obj) {
         Hash = obj.GetString("hash"),
         Date = DateTime.Parse(obj.GetString("date")),
         Message = obj.GetString("message"),
         Repository = obj.GetObject("repository", BitBucketRepositoryInfo.Parse),
         Author = obj.GetObject("author", BitBucketAuthor.Parse),
         Links = obj.GetObject("links", BitBucketLinkCollection.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:16,代码来源:BitBucketCommit.cs


注:本文中的JsonObject.GetObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。