[T] AttributeDecorator
type AttributeDecorator = (context, target) => DecoratorValidatorCallbacks | void;Specify that the target property should be encoded as an XML attribute instead of node.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | DecoratorContext |
target | ModelProperty |
Returns
Section titled “Returns”DecoratorValidatorCallbacks | void
Examples
Section titled “Examples”model Blob { id: string;}<Blob> <id>abcdef</id></Blob>model Blob { @attribute id: string;}<Blob id="abcdef"></Blob>