Attributes
Attributes change how CCL source is interpreted or how target code is generated.
Use this section when you need to know where an attribute can be placed, how to target a specific generator, or which values are accepted.
Attribute pages
Section titled “Attribute pages”- Syntax and scopes explains normal attributes, scoped attributes, and language selectors.
- Generation attributes covers file naming, output grouping, single-file generation, etc…
- Enum attributes covers generated enum names and conversions between enums.
- Serialization attributes covers binary and JSON serialization flags, binary endian selection, and strict binary parsing.
- JSON attributes covers generated JSON field names and naming strategies.
Quick example
Section titled “Quick example”#[CCLVersion("1.0.0")]#[SerializationType("binary")]#[SerializationType("json")]
#namespace:[$go:OutputFileGroup("shared")]
[OutputFileGroup("positions")]model PositionInfo { X: int64; Y: int64; Z: int64;}
model UserInfo { [JsonPropertyName("user_id")] Id: string;}