type A record {
@jsondata:Name {value: "c"}
int a\-name;
string b\-name;
};
public function main() {
A|error z = jsondata:parseAsType({c: 10, b\-name: "a"});
io:println(z);
}
When it runs it gives a below error
error Error ("required field 'a-name' not present in JSON")
Description: Please refer to the below sample
When it runs it gives a below error
Expected output
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues: