Always write an object for ClaimsPrincipal
Merged
SI
3mo ago+48+48+01234567890123456789-5-5-0123456789
An empty ClaimsPrincipal returned without writing any token, which left the writer in Property state after the caller had written the member name. That threw JsonWriterException for a following member, silently emitted null in trailing position, and produced empty output at the root.
The object is now always written. WriteMember drops the empty Identities collection, so an empty principal renders as {}.