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


C# JObject.GetString方法代码示例

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


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

示例1: MailChimpMetadataLogin

 private MailChimpMetadataLogin(JObject obj) : base(obj) {
     Email = obj.GetString("email");
     Avatar = obj.GetString("avatar");
     LoginId = obj.GetInt64("login_id");
     LoginName = obj.GetString("login_name");
     LoginEmail = obj.GetString("login_email");
 }
开发者ID:abjerner,项目名称:Skybrud.Social.MailChimp,代码行数:7,代码来源:MailChimpMetadataLogin.cs

示例2: Parse

 /// <summary>
 /// Gets an instance of <code>GridEditorTextConfig</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="editor">The parent editor.</param>
 /// <param name="obj">The instance of <code>JObject</code> to be parsed.</param>
 public static GridEditorTextConfig Parse(GridEditor editor, JObject obj) {
     if (obj == null) return null;
     return new GridEditorTextConfig(editor, obj) {
         Style = obj.GetString("style"),
         Markup = obj.GetString("markup")
     };
 }
开发者ID:skybrud,项目名称:Skybrud.Umbraco.GridData,代码行数:12,代码来源:GridEditorTextConfig.cs

示例3: PinterestError

 private PinterestError(JObject obj) : base(obj) {
     Status = obj.GetString("status");
     Code = obj.GetInt32("code");
     Host = obj.GetString("host");
     GeneratedAt = obj.GetString("generated_at", SocialDateTime.Parse);
     Message = obj.GetString("message");
     Type = obj.GetString("type");
 }
开发者ID:abjerner,项目名称:Skybrud.Social.Pinterest,代码行数:8,代码来源:PinterestError.cs

示例4: Parse

 /// <summary>
 /// Gets a macro value from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="control">The parent control.</param>
 /// <param name="obj">The instance of <code>JObject</code> to be parsed.</param>
 public static GridControlMacroValue Parse(GridControl control, JObject obj) {
     if (obj == null) return null;
     return new GridControlMacroValue(control, obj) {
         Syntax = obj.GetString("syntax"),
         MacroAlias = obj.GetString("macroAlias"),
         Parameters = obj.GetObject("macroParamsDictionary").ToObject<Dictionary<string, object>>()
     };
 }
开发者ID:skybrud,项目名称:Skybrud.Umbraco.GridData,代码行数:13,代码来源:GridControlMacroValue.cs

示例5: Parse

 internal static TweetUser Parse(JObject obj)
 {
     return new TweetUser {
         ProfileImageUrl = obj.GetString("profile_image_url"),
         ProfileImageUrlHttps = obj.GetString("profile_image_url_https"),
         ScreenName = obj.GetString("screen_name"),
         Name = obj.GetString("name")
     };
 }
开发者ID:karltynan,项目名称:SirTrevor-for-Umbraco,代码行数:9,代码来源:TweetUser.cs

示例6: MailChimpMetadata

 private MailChimpMetadata(JObject obj) : base(obj) {
     DataCenter = obj.GetString("dc");
     AccountName = obj.GetString("accountname");
     Role = obj.GetString("role");
     UserId = obj.GetInt64("user_id");
     Login = obj.GetObject("login", MailChimpMetadataLogin.Parse);
     LoginUrl = obj.GetString("login_url");
     ApiEndpoint = obj.GetString("api_endpoint");
 }
开发者ID:abjerner,项目名称:Skybrud.Social.MailChimp,代码行数:9,代码来源:MailChimpMetadata.cs

示例7: Parse

        public static GridEditorLeBlenderConfig Parse(GridEditor editor, JObject obj)
		{
            if (obj == null) return null;
            return new GridEditorLeBlenderConfig(editor, obj)
            {
                FrontView = obj.GetString("frontView"),
                RenderInGrid = obj.GetString("renderInGrid")
            };
		}
开发者ID:ninjaonsafari,项目名称:Opten.Umbraco.GridData.LeBlender,代码行数:9,代码来源:GridEditorLeBlenderConfig.cs

示例8: TweetBlock

 internal TweetBlock(string type, JObject obj, JObject data)
     : base(type, obj)
 {
     Id = data.GetString("id");
     Text = data.GetString("text");
     User = data.GetObject("user", TweetUser.Parse);
     CreatedAt = data.GetString("created_at", TwitterUtils.ParseDateTimeUtc);
     StatusUrl = data.GetString("status_url");
     Entities = data.GetObject("entities", TweetEntities.Parse);
 }
开发者ID:karltynan,项目名称:SirTrevor-for-Umbraco,代码行数:10,代码来源:TweetBlock.cs

示例9: Parse

 /// <summary>
 /// Gets a media value from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="control">The parent control.</param>
 /// <param name="obj">The instance of <code>JObject</code> to be parsed.</param>
 public static GridControlMediaValue Parse(GridControl control, JObject obj) {
     if (obj == null) return null;
     return new GridControlMediaValue(obj) {
         Control = control,
         FocalPoint = obj.GetObject("focalPoint", GridControlMediaFocalPoint.Parse),
         Id = obj.GetInt32("id"),
         Image = obj.GetString("image"),
         Caption = obj.GetString("caption")
     };
 }
开发者ID:skybrud,项目名称:Skybrud.Umbraco.GridData,代码行数:15,代码来源:GridControlMediaValue.cs

示例10: SpotifyArtist

 private SpotifyArtist(JObject obj) : base(obj) {
     ExternalUrls = obj.GetObject("external_urls", SpotifyArtistUrlCollection.Parse);
     Followers = obj.GetObject("followers", SpotifyFollowers.Parse);
     Genres = obj.GetStringArray("genres");
     Href = obj.GetString("href");
     Id = obj.GetString("id");
     Images = obj.GetArray("images", SpotifyImage.Parse);
     Name = obj.GetString("name");
     Popularity = obj.GetInt32("popularity");
     Type = obj.GetString("type");
     Uri = obj.GetString("uri");
 }
开发者ID:abjerner,项目名称:Skybrud.Social.Spotify,代码行数:12,代码来源:SpotifyArtist.cs

示例11: Parse

 internal static TweetUrl Parse(JObject obj)
 {
     JArray array = obj.GetArray("indices");
     return new TweetUrl {
         Url = obj.GetString("url"),
         ExpandedUrl = obj.GetString("expanded_url"),
         DisplayUrl = obj.GetString("display_url"),
         Indices = new[] {
             array.GetInt32(0),
             array.GetInt32(1)
         }
     };
 }
开发者ID:karltynan,项目名称:SirTrevor-for-Umbraco,代码行数:13,代码来源:TweetUrl.cs

示例12: Parse

 internal static TweetUserMention Parse(JObject obj)
 {
     JArray array = obj.GetArray("indices");
     return new TweetUserMention {
         ScreenName = obj.GetString("screen_name"),
         Name = obj.GetString("name"),
         Id = obj.GetInt64("id"),
         Indices = new[] {
             array.GetInt32(0),
             array.GetInt32(1)
         }
     };
 }
开发者ID:karltynan,项目名称:SirTrevor-for-Umbraco,代码行数:13,代码来源:TweetUserMention.cs

示例13: BoxFolderInfo

 private BoxFolderInfo(JObject obj) : base(obj) {
     Type = obj.GetString("type");
     Id = obj.GetString("id");
     Name = obj.GetString("name");
     CreatedAt = obj.GetString("created_at", SocialDateTime.Parse);
     ModifiedAt = obj.GetString("modified_at", SocialDateTime.Parse);
     Description = obj.GetString("description");
     Size = obj.GetInt64("size");
     CreatedBy = obj.GetObject("created_by", BoxUserInfo.Parse);
     ModifiedBy = obj.GetObject("modified_by", BoxUserInfo.Parse);
     TrashedAt = obj.GetString("trashed_at", SocialDateTime.Parse);
     PurgedAt = obj.GetString("purged_at", SocialDateTime.Parse);
     ContentCreatedAt = obj.GetString("content_created_at", SocialDateTime.Parse);
     ContentModifiedAt = obj.GetString("content_modified_at", SocialDateTime.Parse);
     OwnedBy = obj.GetObject("owned_by", BoxUserInfo.Parse);
 }
开发者ID:abjerner,项目名称:Skybrud.Social.Box,代码行数:16,代码来源:BoxFolderInfo.cs

示例14: GetSearchResult

        private async Task<UISearchMetadata> GetSearchResult(JObject jObject, bool includePrerelease, CancellationToken token)
        {
            var id = jObject.GetString(Properties.PackageId);
            var version = NuGetVersion.Parse(jObject.GetString(Properties.Version));

            var topPackage = new PackageIdentity(id, version);
            var iconUrl = jObject.GetUri(Properties.IconUrl);
            var summary = jObject.GetString(Properties.Summary);

            if (string.IsNullOrWhiteSpace(summary))
            {
                // summary is empty. Use its description instead.
                summary = jObject.GetString(Properties.Description);
            }

            var title = jObject.GetString(Properties.Title);
            if (string.IsNullOrEmpty(title))
            {
                // Use the id instead of the title when no title exists.
                title = id;
            }

            // get other versions
            var versionList = GetLazyVersionList(jObject, includePrerelease, version);

            // retrieve metadata for the top package
            UIPackageMetadata metadata = null;

            var v3MetadataResult = _metadataResource as UIMetadataResourceV3;

            // for v3 just parse the data from the search results
            if (v3MetadataResult != null)
            {
                metadata = v3MetadataResult.ParseMetadata(jObject);
            }

            // if we do not have a v3 metadata resource, request it using whatever is available
            if (metadata == null)
            {
                metadata = await _metadataResource.GetMetadata(topPackage, token);
            }

            var searchResult = new UISearchMetadata(topPackage, title, summary, iconUrl, versionList, metadata);
            return searchResult;
        }
开发者ID:eerhardt,项目名称:NuGet3,代码行数:45,代码来源:UISearchResourceV3.cs

示例15: PinterestUserImageSize

        private PinterestUserImageSize(JObject obj) : base(obj) {

            JProperty property = obj.Parent as JProperty;
            Alias = property == null ? null : property.Name;

            Url = obj.GetString("url");
            Width = obj.GetInt32("width");
            Height = obj.GetInt32("height");
        
        }
开发者ID:abjerner,项目名称:Skybrud.Social.Pinterest,代码行数:10,代码来源:PinterestUserImageSize.cs


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