import ballerina/data.jsondata;
import ballerina/io;
type A43 record {|record{|int[]|int \#content; string...;|} B;|};
public function main() {
A43|error a = jsondata:parseAsType({B: [1,2,3]});
io:println(a);
}
Output
error: java.lang.NullPointerException {"message":"Cannot invoke "io.ballerina.runtime.api.types.Type.getTag()" because "this.rootArray" is null"}
at ballerina.data.jsondata.0:parseAsType(json_api.bal:25)
wso2.xml_data_prod.0:main(test_codes.bal:7)
Code
Output