快速的.NET JSON 序列化庫:Jil

jopen 10年前發布 | 26K 次閱讀 Jil JSON開發包

一個快速的.NET JSON(反)序列化,基于 Sigil 構建并進行一些瘋狂的優化。

支持以下類型(以及其中的任何組成的用戶定義的類型):

  • Strings (including char)
  • Booleans
  • Integer numbers (int, long, byte, etc.)
  • Floating point numbers (float, double, and decimal)
  • DateTimes & DateTimeOffsets

    • See Configuration for further details
    • </ul> </li>

    • Nullable types
    • Enumerations

      • Including [Flags]
      • </ul> </li>

      • Guids

        • Only the "D" format
        • </ul> </li>

        • IList<T> implementations
        • IDictionary<TKey, TValue> implementations where TKey is a string or enumeration
        • </ul>

          Serializing

          using(var output = new StringWriter())
          {
              JSON.Serialize(
                  new
                  {
                      MyInt = 1,
                      MyString = "hello world",
                      // etc.
                  },
                  output
              );
          }</pre><img title="68747470733a2f2f692e696d6775722e636f6d2f4442707a4f79742e706e67.png" border="0" alt="68747470733a2f2f692e696d6775722e636f6d2f4442707a4f79742e706e67.png" src="https://simg.open-open.com/show/fc0850150dc2bb9f267024fcde24aaa6.png" width="600" height="330" /><br />
          

          項目主頁:http://www.baiduhome.net/lib/view/home/1406107385164

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!