Use Newtonsoft in TinyTwitter
This commit is contained in:
parent
d64d59ff27
commit
8308d65375
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -7,7 +8,6 @@ using System.Net;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Web.Script.Serialization;
|
|
||||||
|
|
||||||
namespace TinyTwitter
|
namespace TinyTwitter
|
||||||
{
|
{
|
||||||
|
@ -93,9 +93,7 @@ namespace TinyTwitter
|
||||||
|
|
||||||
var responseContent = builder.Execute();
|
var responseContent = builder.Execute();
|
||||||
|
|
||||||
var serializer = new JavaScriptSerializer();
|
var tweets = (object[])JsonConvert.DeserializeObject(responseContent);
|
||||||
|
|
||||||
var tweets = (object[])serializer.DeserializeObject(responseContent);
|
|
||||||
|
|
||||||
return tweets.Cast<Dictionary<string, object>>().Select(tweet =>
|
return tweets.Cast<Dictionary<string, object>>().Select(tweet =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue