return "mockFunction scuccessful";
}
public function main() returns error? {
string input = "{\"operation\":\"ADDITION\",\"operand1\":23.0,\"operand2\":43.0}";
map & readonly inputJson = check input.fromJsonStringWithType();
any|error observation = function:call(mockFunction, inputJson);
io:println(observation);
}
I got the following error when I tried the above.
error: {ballerina/lang.function}IncompatibleArguments {"message":"arguments of incompatible types: argument list '(map & readonly)' cannot be passed to function expecting parameter list '(ai.agent:record {| string operation; float operand1; float operand2; |})'"}
0 comments:
Post a Comment
Thanks