Skip to content

Commit 4b8a8b1

Browse files
appleseed7evenKostadin Mitevski
andauthored
Json serialization (#1431)
* Json serialization Parameterless constructor restriction removed * Json serialization Minor change, json serializer restricted to class Co-authored-by: Kostadin Mitevski <[email protected]>
1 parent dc80e46 commit 4b8a8b1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Confluent.SchemaRegistry.Serdes.Json/JsonDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace Confluent.SchemaRegistry.Serdes
4646
/// integration of System.Text.Json and JSON Schema, so this
4747
/// is not yet supported by the deserializer.
4848
/// </remarks>
49-
public class JsonDeserializer<T> : IAsyncDeserializer<T> where T : class, new()
49+
public class JsonDeserializer<T> : IAsyncDeserializer<T> where T : class
5050
{
5151
private readonly int headerSize = sizeof(int) + sizeof(byte);
5252

src/Confluent.SchemaRegistry.Serdes.Json/JsonSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace Confluent.SchemaRegistry.Serdes
5353
/// integration of System.Text.Json and JSON Schema, so this
5454
/// is not yet supported by the serializer.
5555
/// </remarks>
56-
public class JsonSerializer<T> : IAsyncSerializer<T> where T : new()
56+
public class JsonSerializer<T> : IAsyncSerializer<T> where T : class
5757
{
5858
private const int DefaultInitialBufferSize = 1024;
5959

0 commit comments

Comments
 (0)