久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <legend id='M5n0Y'><style id='M5n0Y'><dir id='M5n0Y'><q id='M5n0Y'></q></dir></style></legend><tfoot id='M5n0Y'></tfoot>
  2. <small id='M5n0Y'></small><noframes id='M5n0Y'>

    • <bdo id='M5n0Y'></bdo><ul id='M5n0Y'></ul>

      <i id='M5n0Y'><tr id='M5n0Y'><dt id='M5n0Y'><q id='M5n0Y'><span id='M5n0Y'><b id='M5n0Y'><form id='M5n0Y'><ins id='M5n0Y'></ins><ul id='M5n0Y'></ul><sub id='M5n0Y'></sub></form><legend id='M5n0Y'></legend><bdo id='M5n0Y'><pre id='M5n0Y'><center id='M5n0Y'></center></pre></bdo></b><th id='M5n0Y'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='M5n0Y'><tfoot id='M5n0Y'></tfoot><dl id='M5n0Y'><fieldset id='M5n0Y'></fieldset></dl></div>

      使用 DataContractJsonSerializer 反序列化變量類型 JS

      Deserializing variable Type JSON array using DataContractJsonSerializer(使用 DataContractJsonSerializer 反序列化變量類型 JSON 數(shù)組)
        <i id='ZZohd'><tr id='ZZohd'><dt id='ZZohd'><q id='ZZohd'><span id='ZZohd'><b id='ZZohd'><form id='ZZohd'><ins id='ZZohd'></ins><ul id='ZZohd'></ul><sub id='ZZohd'></sub></form><legend id='ZZohd'></legend><bdo id='ZZohd'><pre id='ZZohd'><center id='ZZohd'></center></pre></bdo></b><th id='ZZohd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZZohd'><tfoot id='ZZohd'></tfoot><dl id='ZZohd'><fieldset id='ZZohd'></fieldset></dl></div>
        <legend id='ZZohd'><style id='ZZohd'><dir id='ZZohd'><q id='ZZohd'></q></dir></style></legend>

        <small id='ZZohd'></small><noframes id='ZZohd'>

          • <bdo id='ZZohd'></bdo><ul id='ZZohd'></ul>
          • <tfoot id='ZZohd'></tfoot>

                <tbody id='ZZohd'></tbody>
                本文介紹了使用 DataContractJsonSerializer 反序列化變量類型 JSON 數(shù)組的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我有一個這種形式的 JSON 字符串:

                I have a JSON string in this form:

                string jsonStr = "["A", ["Martini", "alovell"],["Martin", "lovell"]]"
                

                我正在嘗試使用帶有以下代碼片段的 C# .NET 反序列化器 DataContractJsonSerializer 對 JSON 進行反序列化

                I am trying to deserialize the JSON using the C# .NET deserializer DataContractJsonSerializer with the following code snippet

                MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonStr));
                DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof<X>);
                X data = (X)serializer.ReadObject(ms);
                

                現(xiàn)在由于 JSON 數(shù)組是變量類型的數(shù)組,我不知道是什么類型的對象X 應(yīng)該是

                Now since the JSON array is an array of variable types I do not know what type of object X should be

                如果我的字符串是

                jsonStr = "[["Martini", "alovell"],["Martin", "lovell"]]"
                

                我可以用這個:

                X = List<List<String>> 
                

                這對我有用.我想知道是否有任何方法可以反序列化變量類型 JSON 數(shù)組?

                and that would work for me. I was wondering if there is any way to deserialize variable type JSON array?

                推薦答案

                你可以使用 Json.NET 來做到這一點.

                You could use Json.NET to do this.

                JArray a = JArray.Parse(jsonStr);
                

                JArray 將包含字符串或嵌套的 JArray,具體取決于 JSON.

                The JArray would contain either strings or nested JArray's depending on the JSON.

                這篇關(guān)于使用 DataContractJsonSerializer 反序列化變量類型 JSON 數(shù)組的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                Parse malformed XML(解析格式錯誤的 XML)
                  <bdo id='RuwtL'></bdo><ul id='RuwtL'></ul>

                    <tbody id='RuwtL'></tbody>
                  1. <i id='RuwtL'><tr id='RuwtL'><dt id='RuwtL'><q id='RuwtL'><span id='RuwtL'><b id='RuwtL'><form id='RuwtL'><ins id='RuwtL'></ins><ul id='RuwtL'></ul><sub id='RuwtL'></sub></form><legend id='RuwtL'></legend><bdo id='RuwtL'><pre id='RuwtL'><center id='RuwtL'></center></pre></bdo></b><th id='RuwtL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RuwtL'><tfoot id='RuwtL'></tfoot><dl id='RuwtL'><fieldset id='RuwtL'></fieldset></dl></div>
                  2. <small id='RuwtL'></small><noframes id='RuwtL'>

                          <legend id='RuwtL'><style id='RuwtL'><dir id='RuwtL'><q id='RuwtL'></q></dir></style></legend>
                          <tfoot id='RuwtL'></tfoot>

                        • 主站蜘蛛池模板: 91色在线| 福利视频一二区 | 色婷婷综合久久久中文字幕 | 亚洲视频一区在线观看 | 国产精品久久国产精品 | 国产在线高清 | 国产精品福利在线观看 | 一区二区三区 在线 | 亚洲在线一区二区 | 五月免费视频 | www日日日 | 少妇av片| 欧美mv日韩mv国产网站91进入 | 黄色欧美大片 | 夜夜夜夜草 | 一级毛片免费 | 午夜色婷婷 | 亚洲欧美高清 | 亚洲一区二区三区四区五区午夜 | 久久久一二三区 | 国产亚洲成av人片在线观看桃 | 国产精品久久久久久52avav | 中文二区 | 国产精品不卡一区 | 国产一区二区精品在线观看 | 国产一区二区三区亚洲 | 亚洲精品一区二区冲田杏梨 | 在线黄色网 | 日屁视频 | 97超碰站| 一区免费看 | 精品一区二区三区中文字幕 | 日韩三级 | 日韩在线国产 | 久久久亚洲一区 | 91在线免费视频 | 精品国产欧美 | 午夜小视频在线观看 | 亚洲精品一区二区三区中文字幕 | 欧美精品一区二区在线观看 | 国产东北一级毛片 |