Skip to content

Commit

Permalink
core: optimized IsStringJson()
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Jan 17, 2025
1 parent 2a0956c commit f3f3340
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/core/mormot.core.json.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2868,9 +2868,14 @@ function IsStringJson(P: PUtf8Char): boolean; // test if P^ is a "string" value
result := false;
exit;
end;
while (P^ <= ' ') and
(P^ <> #0) do
inc(P);
while P^ <= ' ' do
if P^ = #0 then
begin
result := true;
exit;
end
else
inc(P);
tab := @JSON_CHARS;
c4 := PInteger(P)^;
if (((c4 = NULL_LOW) or
Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'2.3.9425'
'2.3.9426'

0 comments on commit f3f3340

Please sign in to comment.