【发布时间】:2018-06-02 08:09:02
【问题描述】:
我有一个 Json 输出如下
[
{
"eng_trans": "wide, outstretched,"
},
{
"eng_trans": "width,breadth, town, street,earth, country, greatness."
},
{
"eng_trans": "wife, the mistress of the house,"
},
{
"eng_trans": "wide agricultural tract,"
},
{
"eng_trans": "waste land the land which is not suitabie for cultivation."
}]
我只需要取出没有键的单词,并且需要在c#中形成一个字符串列表。有没有更好的方法来做到这一点。
【问题讨论】:
-
到目前为止您尝试了哪些方法,哪些方法不适合您。例如,您是否尝试过使用模型类?
-
或者不使用模型类,而只使用 LINQ to JSON - 将其解析为
JArray,然后从数组中的每个JObject中获取eng_trans值。 -
你有newtonsoft json吗?