You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import ballerina/data.jsondata;
import ballerina/io;
type User readonly & record {|
int id;
|};
public isolated function main() returns error? {
string user2 = string `{"id": 4012}`;
User r2 = check jsondata:parseString(user2);
io:println(r2.id);
}
This gives error: unsupported type '(readonly & record {| int id; |})'.
This should be a valid usecase.
The text was updated successfully, but these errors were encountered:
This gives
error: unsupported type '(readonly & record {| int id; |})'
.This should be a valid usecase.
The text was updated successfully, but these errors were encountered: