Search code examples
c#servicestackdump

C# ServiceStack.Text's Dump - exclude fields


I'm using ServiceStack.Text's Dump() method to make strings out objects for debugging/logging/etc purposes. Is there any way to exclude specific fields from the object from Dump() showing? Hoping there is a simpler way short of making stripped down versions of my same objects and then Automapping and Dump()'ing the 'lite' versions...

Note, I'm still using the last free ServiceStack.Text v3.7 or what not, but would be willing to pay for the new version if it can do this and the old version can't.


Solution

  • You can look at this existing Question on the different ways to ignore properties during Serialization in ServiceStack's Text Serializers.