-
Notifications
You must be signed in to change notification settings - Fork 33
LC0080
Arthur van de Vondervoort edited this page Dec 14, 2024
·
3 revisions
This rule raises a diagnostic when double quotes (") are used in JPath
expressions within SelectToken
method calls on JsonToken
objects. In Business Central, JPath expressions require strings to be wrapped with two single quotes ('') instead of double quotes. Using double quotes causes the expression to fail, often resulting in no output.
procedure MyProcedure()
var
Customer: JsonToken;
Result: JsonToken;
begin
// Double quote character detected in JPath expression. Replace all double quotes (") with two single quotes ('').
Customer.SelectToken('$.custom_attributes[?(@.attribute_code == "activation_status")].value', Result);
end;