The JSON and YAML modules brings their own, very similar Field
annotations.
When an object as to be serialized in both YAML and JSON, both JSON::Field
and YAML::Field
have to be used.
It would save duplications to have only one annotation.
An example to illustrate the redundancy:
class Location
include JSON::Serializable
include YAML::Serializable
@[JSON::Field(key: "lat")]
@[YAML::Field(key: "lat")]
property latitude : Float64
@[JSON::Field(key: "lng")]
@[YAML::Field(key: "lng")]
property longitude : Float64
end