tomasfabian / ksqlDB.RestApi.Client-DotNet

ksqlDb.RestApi.Client is a C# LINQ-enabled client API for issuing and consuming ksqlDB push and pull queries and executing statements.
MIT License
94 stars 25 forks source link

Model classes with single property fail during deserialization #34

Closed tomasfabian closed 1 year ago

tomasfabian commented 1 year ago

Describe the bug Classes, records or structs with only one property used as generic parameter for Select statements fail with the following error:

The JSON value could not be converted to ksqlDB.Api.Client.Samples.Program+MyRecord.

To Reproduce Steps to reproduce the behavior:

using var disposable = context.CreateQueryStream<MyRecord>()
  .Subscribe(value => {}, error => {  },  () => Console.WriteLine("Completed"));
private record MyRecord
{
  public string Name { get; set; }
}

Environment (please complete the following information):

tomasfabian commented 1 year ago

Issue was fixed in ksqlDb.RestApi.Client -Version 2.5.1