Skip to content

Commit 897c1f2

Browse files
committed
Add Serializer context
1 parent 5f5cd3c commit 897c1f2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Playground/Person.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Runtime.Serialization;
6+
using System.Text.Json.Serialization;
67
using Elastic.Clients.Elasticsearch;
8+
using Playground;
79

810
namespace Playground
911
{
@@ -16,7 +18,7 @@ public class Person
1618
public string? FirstName { get; init; }
1719
public string? LastName { get; init; }
1820
public int? Age { get; init; }
19-
public bool IsDeleted { get; init; }
21+
public bool IsDeleted { get; init; }
2022
public Routing? Routing { get; init; }
2123

2224
public Id Idv3 => "testing";
@@ -37,3 +39,8 @@ public class PersonV3
3739
public Guid SecondaryId { get; set; } = Guid.NewGuid();
3840
}
3941
}
42+
43+
44+
45+
[JsonSerializable(typeof(Person))]
46+
internal partial class ExampleJsonSerializerContext : JsonSerializerContext;

0 commit comments

Comments
 (0)