From 42f77ff472c71e7d7b294a2170c0022655c39086 Mon Sep 17 00:00:00 2001 From: StefanGreve Date: Fri, 30 Aug 2024 23:03:36 +0200 Subject: [PATCH] Update example code --- docs/docs/getting-started.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/getting-started.md b/docs/docs/getting-started.md index 9a22a5c..7e9dbdb 100644 --- a/docs/docs/getting-started.md +++ b/docs/docs/getting-started.md @@ -41,9 +41,11 @@ services.AddSerializationService(); // retrieve an instance of a service var serializationService = hostBuilder.Services.GetService(); +var developer = new Person("Stefan", "Greve"); + // serialize and deserialize an object -var serialized = serializationService.Serialize(expected, PersonContext.Default.Person); -var actual = serializationService.Deserialize(serialized, PersonContext.Default.Person); +byte[] serialized = serializationService.Serialize(developer, PersonContext.Default.Person); +Person? person = serializationService.Deserialize(serialized, PersonContext.Default.Person); ``` ### Further Reading