annotation CrSerializer::Annotations::Exclude
Overview
Indicates that a property should not be serialized/deserialized when used with CrSerializer::ExclusionPolicy::None
.
Also see, CRS::IgnoreOnDeserialize
and CRS::IgnoreOnSerialize
.
@[CRS::ExclusionPolicy(:none)]
class Example
include CrSerializer
def initialize; end
property name : String = "Jim"
@[CRS::Exclude]
property password : String? = "monkey"
end
Example.new.to_json # => {"name":"Jim"}