Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 15dfd14

Browse files
committed
INCR to v3.9.44
1 parent c0ad2cc commit 15dfd14

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

NuGet/servicestack.text.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<version>3.9.44</version>
77
<authors>Demis Bellot</authors>
88
<owners>Demis Bellot</owners>
9-
<summary>.NET's fastest JSON, JSV and CSV Text Serializers (3x faster than JSON.NET)</summary>
9+
<summary>.NET's fastest JSON, JSV and CSV Text Serializers</summary>
1010
<description>
11-
.NET's fastest JSON, JSV and CSV Text Serializers (3x faster than JSON.NET). Fast, Light, Resilient.
11+
.NET's fastest JSON, JSV and CSV Text Serializers. Fast, Light, Resilient.
1212
Benchmarks at: http://servicestack.net/benchmarks/
1313
Includes the String and Stream functionality for all the ServiceStack projects including:
1414
- T.Dump() generic extension method for easy dbugging and introspection of types

src/ServiceStack.Text/Env.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static Env()
3434
+ (IsWinRT ? ".NET WinRT" : "");
3535
}
3636

37-
public static decimal ServiceStackVersion = 3.943m;
37+
public static decimal ServiceStackVersion = 3.944m;
3838

3939
public static bool IsUnix { get; set; }
4040

src/ServiceStack.Text/JsonObject.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,15 @@ public class JsonObject : Dictionary<string, string>
7575
set { base[key] = value; }
7676
}
7777

78-
public static JsonObject Parse(string json)
79-
{
80-
return JsonSerializer.DeserializeFromString<JsonObject>(json);
81-
}
78+
public static JsonObject Parse(string json)
79+
{
80+
return JsonSerializer.DeserializeFromString<JsonObject>(json);
81+
}
82+
83+
public static JsonArrayObjects ParseArray(string json)
84+
{
85+
return JsonArrayObjects.Parse(json);
86+
}
8287

8388
public JsonArrayObjects ArrayObjects(string propertyName)
8489
{

tests/ServiceStack.Text.Tests/JsonObjectTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,15 @@ public void Does_encode_unicode()
5050
System.Diagnostics.Debug.WriteLine(copy1["test"]);
5151
}
5252
}
53+
54+
[Test]
55+
public void Can_parse_Twitter_response()
56+
{
57+
var json = @"[{""is_translator"":false,""geo_enabled"":false,""profile_background_color"":""000000"",""protected"":false,""default_profile"":false,""profile_background_tile"":false,""created_at"":""Sun Nov 23 17:42:51 +0000 2008"",""name"":""Demis Bellot TW"",""profile_background_image_url_https"":""https:\/\/si0.twimg.com\/profile_background_images\/192991651\/twitter-bg.jpg"",""profile_sidebar_fill_color"":""2A372F"",""listed_count"":36,""notifications"":null,""utc_offset"":0,""friends_count"":267,""description"":""StackExchangarista, JavaScript, C#, Web & Mobile developer. Creator of the ServiceStack.NET projects. "",""following"":null,""verified"":false,""profile_sidebar_border_color"":""D9D082"",""followers_count"":796,""profile_image_url"":""http:\/\/a2.twimg.com\/profile_images\/1598852740\/avatar_normal.png"",""contributors_enabled"":false,""profile_image_url_https"":""https:\/\/si0.twimg.com\/profile_images\/1598852740\/avatar_normal.png"",""status"":{""possibly_sensitive"":false,""place"":null,""retweet_count"":37,""in_reply_to_screen_name"":null,""created_at"":""Mon Nov 07 02:34:23 +0000 2011"",""retweeted"":false,""in_reply_to_status_id_str"":null,""in_reply_to_user_id_str"":null,""contributors"":null,""id_str"":""133371690876022785"",""retweeted_status"":{""possibly_sensitive"":false,""place"":null,""retweet_count"":37,""in_reply_to_screen_name"":null,""created_at"":""Mon Nov 07 02:32:15 +0000 2011"",""retweeted"":false,""in_reply_to_status_id_str"":null,""in_reply_to_user_id_str"":null,""contributors"":null,""id_str"":""133371151551447041"",""in_reply_to_user_id"":null,""in_reply_to_status_id"":null,""source"":""\u003Ca href=\""http:\/\/www.arstechnica.com\"" rel=\""nofollow\""\u003EArs auto-tweeter\u003C\/a\u003E"",""geo"":null,""favorited"":false,""id"":133371151551447041,""coordinates"":null,""truncated"":false,""text"":""Google: Microsoft uses patents when products \""stop succeeding\"": http:\/\/t.co\/50QFc1uJ by @binarybits""},""in_reply_to_user_id"":null,""in_reply_to_status_id"":null,""source"":""web"",""geo"":null,""favorited"":false,""id"":133371690876022785,""coordinates"":null,""truncated"":false,""text"":""RT @arstechnica: Google: Microsoft uses patents when products \""stop succeeding\"": http:\/\/t.co\/50QFc1uJ by @binarybits""},""profile_use_background_image"":true,""favourites_count"":238,""location"":""New York"",""id_str"":""17575623"",""default_profile_image"":false,""show_all_inline_media"":false,""profile_text_color"":""ABB8AF"",""screen_name"":""demisbellot"",""statuses_count"":9638,""profile_background_image_url"":""http:\/\/a0.twimg.com\/profile_background_images\/192991651\/twitter-bg.jpg"",""url"":""http:\/\/www.servicestack.net\/mythz_blog\/"",""time_zone"":""London"",""profile_link_color"":""43594A"",""id"":17575623,""follow_request_sent"":null,""lang"":""en""}]";
58+
var objs = JsonObject.ParseArray(json);
59+
var obj = objs[0];
60+
61+
Assert.That(obj.Get("name"), Is.EqualTo("Demis Bellot TW"));
62+
}
5363
}
5464
}

0 commit comments

Comments
 (0)