More convenient way to specify an annotation value with only one field #1035
Labels
Area/Lang
Relates to the Ballerina language specification
Type/Improvement
Enhancement to language design
Description:
Currently, the annotation should be a subtype of one of the three types: true, mapvalue:Cloneable, mapvalue:Cloneanble[].
When annotations are used for mapping record fields such as JSON to/from record conversion and database query results mapping, the annotation needs to contain only one value. Here, repeating the key for the value is a bit cumbersome since there will be numerous fields.
Here, the name key needs to be repeated again and again. With support for
string
type, this can be simplified as follows:The text was updated successfully, but these errors were encountered: