Prevent property serialization in servicestack RedisClient

I think the title is clear. ServiceStack Redis Client serializes (saves) Get Only Properties (I also added the ReadOnly attribute).

This is mistake?

+4
source share
1 answer

This is the expected behavior: if its readable will be serialized, and if it can be written to be deserializable. those. it serializes properties only for , but will not serialize only for public properties only.

ServiceStack serializers support the [IgnoreDataMember] attribute, ignoring properties, see this example .

+6
source

Source: https://habr.com/ru/post/1414761/


All Articles