Closed alberk8 closed 1 month ago
@scottf might know the answer :)
@Jarema Thanks for looking into this. I think I might have found the answer.
Adding more info in the Intellisense would be very helpful.
Install the nuget NATS.Client.Serializers.Json
using NATS.Client.Serializers.Json;
var opt = new NatsOpts
{
Url = "nats://127.0.0.1:4222",
SerializerRegistry = NatsJsonSerializerRegistry.Default,
Name = "Nats_Connect"
};
@alberk8 Can I close this or is there something that might need to be added to an example? If there is, you are welcome to contribute something and I'll help you through the PR. It also might make sense to add something directly to the client repo.
@alberk8 Closing this. If you have more questions please visit the .NET V2 CLient repo and post a discussion or issue.
I have the following code with error
Can't Serialize
on theawait jsContext.PublishAsync<Person>("data.person", data: person);
. What am I doing wrong here?Environment NATS server 2.10.11 with JetStream enabled .Net 8.0 C# nuget: NATS.Client.JetStream 2.1.2