We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d998f25 commit 12a47caCopy full SHA for 12a47ca
ExampleServer/Startup.cs
@@ -1,4 +1,5 @@
1
using System.Linq;
2
+using System.Text.Json;
3
using Microsoft.AspNetCore.Builder;
4
using Microsoft.AspNetCore.Hosting;
5
using Microsoft.Extensions.Configuration;
@@ -29,6 +30,10 @@ public void ConfigureServices(IServiceCollection services)
29
30
31
// Identify and build routes for the current assembly
32
services.AddMqttControllers();
33
+
34
+ // Use specific deserialization option for MQTT payload deserialization
35
+ services.AddMqttDefaultJsonOptions(new JsonSerializerOptions(JsonSerializerDefaults.Web));
36
37
services
38
.AddHostedMqttServerWithServices(s =>
39
{
0 commit comments