【发布时间】:2017-05-10 08:04:01
【问题描述】:
我想使用 twitterizer 从 Twitter 中的 Product.cs 类发送数据。我已经通过twitterizer方法发送字符串并且测试是正确的。我有
http://cncpts.com/products.json
其中包含我从 JSON2CSharp 生成的类的 json 数据。但我想从这个 json http://cncpts.com/products.json 中获取数据,并希望将所有数据放入数据库中。
请告诉我用 json 链接类的方法是什么。以下是我想与 json 数据链接的类。
public class Product
{
public object id { get; set; }
public string title { get; set; }
public string handle { get; set; }
public string body_html { get; set; }
public string published_at { get; set; }
public string created_at { get; set; }
public string updated_at { get; set; }
public string vendor { get; set; }
public string product_type { get; set; }
public List<string> tags { get; set; }
public List<Variant> variants { get; set; }
public List<Image> images { get; set; }
public List<Option> options { get; set; }
}
【问题讨论】: