annotation BSON::Field

Overview

This annotation can be used to ignore or rename properties.

@[BSON::Field(ignore: true)]
property ignored_property : Type
@[BSON::Field(key: new_name)]
property renamed_property

Defined in:

bson/serializable.cr