1234567891011121314module juptune.data.json.serialise;
template JsonUdaOf(
alias Symbol
)
{
/++ MANIFEST CONSTANTS ++/
///
enum int FoundUda = Uda;
///
enum int JsonUdaOf = ()
{
Json uda = FoundUda;
if (uda.name.length == 0)
uda.name = __traits(identifier, Symbol);
return uda;
}
();
}
Resolves to the @JsonUDA attached onto Symbol, or typeof(null)if Symboldoesn't have the @JsonUDA attached to it.
If the attached JsonUDA has an empty Json.namefield, then this field is set to the identifier of Symbol.
If the attached JsonUDA is just the type Json(rather than an instantiation like @Json()), then Json.initwill be used as the UDA's value.
| Name | Description |
|---|---|
| FoundUda | |
| JsonUdaOf |