import ballerina/data.xmldata;
public function main() returns error? {
xml x = xml `<employee><name>Joy</name></employee>`;
// Allowed.
record {| json...; |} _ = check xmldata:parseAsType(x);
// invalid type: expected a record type
map<json> _ = check xmldata:parseAsType(x);
}
$ bal run temp.bal
Compiling source
temp.bal
ERROR [temp.bal:(9:5,9:48)] invalid type: expected a record type
Description
$title.
Steps to Reproduce
Version
v1.0.0
Environment Details (with versions)
No response