1

Can ServiceStack.Text.JsonSerializer to work with class that implements ISerializable instead of taking public properties?

Thank you

Leo Y
  • 659
  • 7
  • 22

1 Answers1

0

No ISerializable doesn't have any impact in ServiceStack.Text serializers which by default only serializes public properties but can be made to also serialize public fields with:

JsConifg.IncludePublicFields = true;

There are also a number of different ways to ignore fields you don't want serialized.

Community
  • 1
  • 1
mythz
  • 141,670
  • 29
  • 246
  • 390
  • It's unfortunate, since ISerializable sounds as a standard interface that is worth to support. – Leo Y Mar 26 '16 at 10:31
  • @LeoY it's not, it's only for Microsoft Serializers and imposes an unnecessary implementation. – mythz Mar 26 '16 at 15:48