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

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

          <bdo id='loeAw'></bdo><ul id='loeAw'></ul>

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

        對象&amp;使用 JSON.Net 進行駝峰式轉換

        JObject amp; CamelCase conversion with JSON.Net(對象amp;使用 JSON.Net 進行駝峰式轉換)

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

            <tbody id='EkDmF'></tbody>

            <bdo id='EkDmF'></bdo><ul id='EkDmF'></ul>
            <tfoot id='EkDmF'></tfoot>
              1. <legend id='EkDmF'><style id='EkDmF'><dir id='EkDmF'><q id='EkDmF'></q></dir></style></legend>

                <i id='EkDmF'><tr id='EkDmF'><dt id='EkDmF'><q id='EkDmF'><span id='EkDmF'><b id='EkDmF'><form id='EkDmF'><ins id='EkDmF'></ins><ul id='EkDmF'></ul><sub id='EkDmF'></sub></form><legend id='EkDmF'></legend><bdo id='EkDmF'><pre id='EkDmF'><center id='EkDmF'></center></pre></bdo></b><th id='EkDmF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EkDmF'><tfoot id='EkDmF'></tfoot><dl id='EkDmF'><fieldset id='EkDmF'></fieldset></dl></div>
                • 本文介紹了對象&amp;使用 JSON.Net 進行駝峰式轉換的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何將通用 JObject 轉換為 camelCase 純 json 字符串?我試過 JsonSerializerSettings 但不起作用(Newtonsoft.Json 4.5.11)

                  How can I convert a generic JObject to camelCase plain json string? I've tried with JsonSerializerSettings but doesn't work (Newtonsoft.Json 4.5.11)

                  [Test]
                  public void should_convert_to_camel_case()
                  {
                      var serializer = JsonSerializer.Create(new JsonSerializerSettings()
                      {
                          ContractResolver = new CamelCasePropertyNamesContractResolver()
                      });
                  
                      var jo = new JObject();
                      jo["CamelCase"] = 1;
                  
                      var stringWriter = new StringWriter();
                      var writer = new JsonTextWriter(stringWriter);
                      serializer.Serialize(writer,jo);
                  
                      var serialized = stringWriter.ToString();
                  
                      Assert.AreEqual("{"camelCase":1}", serialized);
                  }
                  

                  更新根據 http://json.codeplex.com/workitem/23853 無法完成(tnx 到 @nick_w 獲取鏈接)

                  UPDATE According to http://json.codeplex.com/workitem/23853 that cannot be done (tnx to @nick_w for the link)

                  推薦答案

                  這道題從一個JObject開始,想對一個駝峰式的JSON對象起作用.如果您實際上是從一個對象開始并想要獲得一個已經被駝峰??化的 JObject,那么您可以這樣做:

                  This question starts from a JObject and wants to work to a camel-cased JSON object. If you are actually starting from an object and want to get to a JObject that is already camelcased, then you can do this:

                  var serializer = new JsonSerializer()
                  {
                      ContractResolver = new CamelCasePropertyNamesContractResolver()
                  };
                  var jo = JObject.FromObject(someDataContract, serializer);
                  

                  生成的 'jo' 將被駝峰化.

                  The resulting 'jo' will be camelcased.

                  這篇關于對象&amp;使用 JSON.Net 進行駝峰式轉換的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  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='qzwOq'></bdo><ul id='qzwOq'></ul>

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

                    • <legend id='qzwOq'><style id='qzwOq'><dir id='qzwOq'><q id='qzwOq'></q></dir></style></legend>
                    • <tfoot id='qzwOq'></tfoot>
                        <tbody id='qzwOq'></tbody>

                          <i id='qzwOq'><tr id='qzwOq'><dt id='qzwOq'><q id='qzwOq'><span id='qzwOq'><b id='qzwOq'><form id='qzwOq'><ins id='qzwOq'></ins><ul id='qzwOq'></ul><sub id='qzwOq'></sub></form><legend id='qzwOq'></legend><bdo id='qzwOq'><pre id='qzwOq'><center id='qzwOq'></center></pre></bdo></b><th id='qzwOq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qzwOq'><tfoot id='qzwOq'></tfoot><dl id='qzwOq'><fieldset id='qzwOq'></fieldset></dl></div>
                            主站蜘蛛池模板: 欧美日韩专区 | 国产一区二区三区 | 午夜三级在线观看 | 成人午夜免费在线视频 | 免费人成激情视频在线观看冫 | 一区二区视频在线 | 日韩电影免费观看中文字幕 | 国产精品国产三级国产播12软件 | 欧美日产国产成人免费图片 | av男人天堂影院 | 亚洲福利免费 | www.欧美.com | www.夜夜草 | 久久久精品 | 国产精品一区二区三 | 亚洲精品1区 | 日韩影院在线 | 国产精彩视频一区 | 久草免费在线视频 | 日韩中文在线视频 | 91久久夜色精品国产网站 | 毛片视频网站 | 美女久久视频 | 亚洲网站在线观看 | 一级毛片在线播放 | 成人在线精品视频 | 国产欧美日韩一区二区三区在线 | 自拍偷拍精品 | 丁香婷婷久久久综合精品国产 | 国产视频久 | 久久91精品国产一区二区三区 | 日韩欧美在线免费观看视频 | 午夜私人影院在线观看 | 精品中文字幕在线 | 99精品电影| 紧缚调教一区二区三区视频 | 福利片一区二区 | 欧美理论在线观看 | 欧美一区二区在线观看 | 精品国产乱码久久久久久图片 | 日韩在线欧美 |