Doc link: https://docs.microsoft.com/en-us/windows/communitytoolkit/helpers/objectserializer
The IObjectSerializer docs are outdated and show an implementation based on the previous signatures, which used strings.
The new signatures use object instead, so the sample code won't actually compile.
I don't have a good example for what it should be, because the solution is not so straight forward with object over string.