EasilyNET.MongoSerializer.AspNetCore
3.24.929.143
dotnet add package EasilyNET.MongoSerializer.AspNetCore --version 3.24.929.143
NuGet\Install-Package EasilyNET.MongoSerializer.AspNetCore -Version 3.24.929.143
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="EasilyNET.MongoSerializer.AspNetCore" Version="3.24.929.143" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasilyNET.MongoSerializer.AspNetCore --version 3.24.929.143
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EasilyNET.MongoSerializer.AspNetCore, 3.24.929.143"
#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 EasilyNET.MongoSerializer.AspNetCore as a Cake Addin #addin nuget:?package=EasilyNET.MongoSerializer.AspNetCore&version=3.24.929.143 // Install EasilyNET.MongoSerializer.AspNetCore as a Cake Tool #tool nuget:?package=EasilyNET.MongoSerializer.AspNetCore&version=3.24.929.143
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EasilyNET.MongoSerializer.AspNetCore
EasilyNET.Mongo.AspNetCore 扩展,用于支持一些非默认类型的序列化方案.就算是没有使用 EasilyNET.Mongo.AspNetCore 也能使用这个库进行如下内容的扩展.
ChangeLogs
- 支持自定义 TimeOnly 和 DateOnly 的格式化格式.
- 支持转换成字符串格式
- 转换成 Ticks 的方式存储
- 若想转化成其他类型也可自行实现,如:转化成 ulong 类型
- 添加动态类型支持[object 和 dynamic], 2.20 版后官方又加上了. JsonArray.
- 添加JsonNode类型支持.
配合 EasilyNET.Mongo.AspNetCore 或单独使用
JsonNode类型因为反序列化时不支持Unicode字符,如果需要序列化插入至其他地方(例如Redis),在序列化时需要将JsonSerializerOptions的Encoder属性设置为System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping.
builder.Services.AddMongoContext<DbContext>(builder.Configuration)
// 添加自定义序列化
builder.Services.RegisterSerializer(new DateOnlySerializerAsString());
builder.Services.RegisterSerializer(new TimeOnlySerializerAsString());
// 或者将他们存储为long类型的Ticks,也可以自己组合使用.
builder.Services.RegisterSerializer(new DateOnlySerializerAsTicks());
builder.Services.RegisterSerializer(new TimeOnlySerializerAsTicks());
// 添加JsonNode支持
builder.Services.RegisterSerializer(new JsonNodeSerializer());
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. net9.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-rc.1.24431.7)
- MongoDB.Bson (>= 2.29.0)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-rc.1.24431.7)
- MongoDB.Bson (>= 2.29.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.24.929.143 | 208 | 9/29/2024 |
3.24.929.141 | 59 | 9/29/2024 |
3.24.929.131 | 69 | 9/29/2024 |
3.24.929.122 | 62 | 9/29/2024 |
3.24.926.184 | 65 | 9/26/2024 |
3.24.926.182 | 64 | 9/26/2024 |
3.24.926.175 | 61 | 9/26/2024 |
3.24.924.160 | 66 | 9/24/2024 |
3.24.924.133 | 63 | 9/24/2024 |
3.24.924.124 | 57 | 9/24/2024 |
3.24.924.10 | 59 | 9/23/2024 |
3.24.924.1 | 51 | 9/23/2024 |
3.24.923.234 | 49 | 9/23/2024 |
3.24.923.232 | 52 | 9/23/2024 |
3.24.923.155 | 55 | 9/23/2024 |
3.24.919.92 | 64 | 9/19/2024 |
3.24.914.125 | 216 | 9/14/2024 |
3.24.914.115 | 81 | 9/14/2024 |
3.24.914.111 | 67 | 9/14/2024 |
3.24.911.95 | 61 | 9/11/2024 |
3.24.908.215 | 58 | 9/8/2024 |
3.24.904.200 | 212 | 9/4/2024 |
3.24.828.163 | 68 | 8/28/2024 |
3.24.820.173 | 69 | 8/20/2024 |
3.24.814.92 | 76 | 8/14/2024 |
3.24.812.115 | 73 | 8/12/2024 |
3.24.802.100 | 50 | 8/2/2024 |
3.24.801.162 | 59 | 8/1/2024 |
3.24.801.160 | 55 | 8/1/2024 |
3.24.801.155 | 54 | 8/1/2024 |
3.24.730.164 | 48 | 7/30/2024 |
3.24.730.91 | 50 | 7/30/2024 |
3.24.724.91 | 50 | 7/24/2024 |
3.24.718.105 | 69 | 7/18/2024 |
3.24.716.95 | 59 | 7/16/2024 |
3.24.712.94 | 52 | 7/12/2024 |
3.24.710.14 | 57 | 7/9/2024 |
3.24.709.105 | 58 | 7/9/2024 |
3.24.704.94 | 60 | 7/4/2024 |
3.24.701.90 | 58 | 7/1/2024 |
3.24.628.114 | 67 | 6/28/2024 |
3.24.627.145 | 56 | 6/27/2024 |
3.24.620.160 | 67 | 6/20/2024 |
3.24.613.115 | 57 | 6/13/2024 |
3.24.612.95 | 62 | 6/12/2024 |
3.24.528.90 | 61 | 5/28/2024 |
3.24.522.84 | 67 | 5/22/2024 |
3.24.512.213 | 60 | 5/12/2024 |
3.24.508.112 | 71 | 5/8/2024 |
2.2024.428.71 | 60 | 4/28/2024 |
2.2024.427.1128 | 66 | 4/27/2024 |
2.2.72 | 139 | 4/14/2024 |
2.2.71 | 70 | 4/12/2024 |
2.2.8 | 63 | 4/26/2024 |
2.2.6 | 63 | 4/10/2024 |
2.2.5 | 78 | 3/26/2024 |
2.2.4 | 84 | 3/25/2024 |
2.2.3 | 73 | 3/24/2024 |
2.2.2 | 76 | 3/21/2024 |
2.2.1 | 85 | 3/20/2024 |
2.2.0 | 85 | 3/13/2024 |
2.1.9 | 87 | 2/21/2024 |
2.1.8 | 75 | 2/18/2024 |
2.1.7 | 83 | 2/16/2024 |
2.1.6 | 95 | 2/14/2024 |
2.1.5 | 73 | 2/14/2024 |
2.1.4 | 155 | 2/9/2024 |
2.1.3 | 110 | 2/8/2024 |
2.1.2 | 125 | 2/5/2024 |
2.1.1.2 | 210 | 12/26/2023 |
2.1.1.1 | 132 | 12/26/2023 |
2.1.1 | 149 | 12/25/2023 |
2.1.0 | 136 | 12/17/2023 |
2.0.11 | 188 | 12/6/2023 |
2.0.1 | 215 | 11/15/2023 |
2.0.0 | 157 | 11/14/2023 |
1.9.1 | 124 | 11/1/2023 |
1.9.0 | 114 | 10/19/2023 |
1.9.0-preview2 | 273 | 10/12/2023 |
1.9.0-preview1 | 77 | 10/12/2023 |
1.8.9 | 143 | 10/11/2023 |
1.8.8 | 128 | 10/11/2023 |
1.8.7-rc2 | 108 | 9/21/2023 |
1.8.7-rc1 | 84 | 9/12/2023 |
1.8.6 | 130 | 8/31/2023 |
1.8.5 | 789 | 8/25/2023 |
1.8.4 | 117 | 8/24/2023 |
1.8.3 | 117 | 8/23/2023 |
1.8.2 | 203 | 8/22/2023 |
1.8.1 | 137 | 8/18/2023 |
1.8.0 | 121 | 8/15/2023 |
1.7.9 | 163 | 8/11/2023 |
1.7.8 | 105 | 8/11/2023 |
1.7.7 | 141 | 8/10/2023 |
1.7.6 | 138 | 8/9/2023 |
1.7.5 | 189 | 8/9/2023 |
1.7.4 | 221 | 8/3/2023 |
1.7.3 | 137 | 8/1/2023 |
1.7.2 | 132 | 7/31/2023 |
1.7.1 | 133 | 7/27/2023 |
1.7.0 | 139 | 7/25/2023 |
1.6.9 | 134 | 7/25/2023 |
1.6.8 | 134 | 7/24/2023 |
1.6.7 | 145 | 7/20/2023 |
1.6.6 | 144 | 7/19/2023 |
1.6.5 | 109 | 7/19/2023 |
1.6.4 | 134 | 7/17/2023 |
1.6.3 | 102 | 7/17/2023 |
1.6.2 | 161 | 7/12/2023 |
1.6.1 | 165 | 6/30/2023 |
1.6.0 | 99 | 6/30/2023 |