using System;
using Newtonsoft.Json;
using System.IO;
using Newtonsoft.Json.Linq;
namespace SQLHelper {
class Program {
static void Main(string[] args) {
string strReadFilePath = @"data.json";
StreamReader srReadFile = new StreamReader(strReadFilePath);
string jsonText = "";
while (!srReadFile.EndOfStream) {
jsonText += srReadFile.ReadLine();
}
JObject jo = (JObject)JsonConvert.DeserializeObject(jsonText);
foreach (var i in jo.Values()) {
Console.WriteLine(i["href"]);
}
}
}
}
请发表评论