Skip to content

Commit

Permalink
[ksqlDB.RestApi.Client]: RowValueJsonSerializer fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfabian committed Mar 4, 2024
1 parent 4399762 commit 9bc34cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#if !NETSTANDARD
using System;
#if !NETSTANDARD
using System.Net;
using System.Net.Http;
using System.Text.Json;
using ksqlDb.RestApi.Client.KSql.Query.Context.Options;
using ksqlDB.RestApi.Client.KSql.RestApi.Exceptions;
Expand Down Expand Up @@ -92,4 +90,4 @@ protected override string OnReadHeader<T>(string rawJson)
}
}
}
#endif
#endif
4 changes: 4 additions & 0 deletions ksqlDb.RestApi.Client/KSql/RestApi/RowValueJsonSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ internal RowValueJsonSerializer(QueryStreamHeader queryStreamHeader)

internal RowValue<T> Deserialize<T>(string rawJson, JsonSerializerOptions jsonSerializerOptions)
{
#if NETSTANDARD
var result = rawJson.Substring(1, rawJson.Length - 2);
#else
var result = rawJson[1 .. ^1];
#endif

if (queryStreamHeader.ColumnTypes.Length == 1 && !typeof(T).IsAnonymousType())
{
Expand Down

0 comments on commit 9bc34cd

Please sign in to comment.