Skip to content

Commit

Permalink
Update example code
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanGreve committed Aug 30, 2024
1 parent 109f994 commit 42f77ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ services.AddSerializationService();
// retrieve an instance of a service
var serializationService = hostBuilder.Services.GetService<ISerializationService>();

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
Expand Down

0 comments on commit 42f77ff

Please sign in to comment.