Nino.Serialization 2.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nino.Serialization --version 2.0.2                
NuGet\Install-Package Nino.Serialization -Version 2.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nino.Serialization" Version="2.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nino.Serialization --version 2.0.2                
#r "nuget: Nino.Serialization, 2.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Nino.Serialization as a Cake Addin
#addin nuget:?package=Nino.Serialization&version=2.0.2

// Install Nino.Serialization as a Cake Tool
#tool nuget:?package=Nino.Serialization&version=2.0.2                

Nino

Definite useful and high performance serialisation library for C# projects, especially for Unity.

实用的高性能C#序列化库,尤其在Unity平台能带来令人难以置信的效益。

buildlicense

功能列表

使用教程 nino.nuget

Protobuf-net/MsgPack/BinaryFormatter/Bson/JSON等序列化库的平替方案,优势是更小体积,更高性能,支持多线程,支持多态

注意,该模块的序列化数据,仅支持在C#平台使用该库进行序列化和反序列化,无法跨语言使用

Nino.Serialization v2.0.0与所有1.x版本都不兼容,详细请查看使用教程

  • 支持全部非托管类型(int/float/datetime/vector/etc)

  • 支持任意Nullable类型

  • 支持任意ICollection类型(list/dictonary/hashset/etc)

  • 支持任意Span类型

  • 支持自定义Nino序列化类型

  • 支持嵌套上述类型(dictionary<int, list<自定义nino类型[]>>)

  • 支持多态

  • 支持数据校验

  • 性能高,GC低!

  • 测试案例

    • Test1 Nino VS Protobuf-net 序列化

    • Test2 Nino VS BinaryFormatter 序列化

    • Test3 Nino VS Protobuf-net 反序列化

    • Test4 Nino VS BinaryFormatter 反序列化

    • Test5 Nino VS MongoDB.Bson 序列化以及反序列化

    • Test6 Nino VS MsgPack 序列化以及反序列化

    • Test7 自定义Nino序列化反序列化委托

    • Test8 自动收集全部字段进行序列化/反序列化(无需给单个字段或属性打标签)

    • Test9 基础类型序列化反序列化

    • Test10 复杂结构类型序列化反序列化

    • Test11 ILRuntime测试(需要搭配使用教程启用ILRuntime)

    • 真机测试 可以打IL2CPP或Mono包进行测试(对比了Nino Reflection/Code Gen与Protobuf-net/BinaryFormatter/Bson/MsgPack Code Gen的序列化性能、序列化体积、反序列化性能)

      Protobuf-net与Bson在IL2CPP下暂不支持字典序列化

  • 性能报告

目录结构

  • Docs,文档
  • src,Nino源码
  • Nino_Unity,Nino Unity 2022.3及以上版本的工程,包含源码和测试代码
  • Performance,性能报告
  • Nino.unitypackage,Unity包

在Unity平台使用

参考使用教程

在非Unity平台使用

  • 使用NuGet

    NuGet里搜Nino

    PM> Install-Package Nino -Version 2.0.1
    
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Nino.Serialization:

Package Downloads
Nino

High performance and low size binary serialization solution, especially for Unity.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Nino.Serialization:

Repository Stars
RRQM/TouchSocket
TouchSocket是.Net(包括 C# 、VB.Net、F#)的一个整合性的、超轻量级的网络通信框架。包含了 tcp、udp、ssl、http、websocket、rpc、jsonrpc、webapi、xmlrpc等一系列的通信模块。一键式解决 TCP 黏分包问题,udp大数据包分片组合问题等。使用协议模板,可快速实现「固定包头」、「固定长度」、「区间字符」等一系列的数据报文解析。
Version Downloads Last updated
2.0.5 47 7/24/2024
2.0.4 67 7/18/2024
2.0.3 65 7/8/2024
2.0.2 65 7/8/2024
2.0.1 88 7/3/2024
2.0.0.2 120 7/2/2024
2.0.0.1 146 7/2/2024
2.0.0 70 7/2/2024
2.0.0-official 101 7/2/2024
1.2.2 257 10/18/2023
1.2.1 256 7/12/2023
1.2.0 105 7/11/2023
1.1.2.1 244 2/10/2023
1.1.2 238 2/9/2023
1.1.1 233 2/7/2023
1.1.0 338 1/21/2023
1.0.21.2 271 1/7/2023
1.0.21 277 1/7/2023
1.0.20 269 12/11/2022
1.0.19.2 354 10/30/2022
1.0.19 333 10/30/2022
1.0.18 364 10/24/2022
1.0.17 353 10/5/2022
1.0.16 351 8/15/2022
1.0.15 364 8/11/2022
1.0.14 411 8/7/2022
1.0.13 386 7/29/2022
1.0.12 389 7/27/2022
1.0.11 379 7/24/2022
1.0.10 385 7/20/2022
1.0.9 387 7/9/2022
1.0.8 388 7/4/2022
1.0.7 416 7/3/2022
1.0.6 401 7/2/2022
1.0.5 408 7/1/2022
1.0.4 395 7/1/2022
1.0.3 380 6/30/2022
1.0.2 372 6/30/2022
1.0.1 379 6/30/2022
1.0.0 392 6/30/2022

Nino.Serialization v2.0.2
- [Optimisation] More efficient code generation for unmanaged types and arrays