Skip to content

Commit afad8e4

Browse files
authored
fixed json value parse bug
add ```JsonString := Trim(JsonString);``` to TJsonValue.Parse
1 parent 54a9730 commit afad8e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Jsons.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ function TJsonValue.GetIsNull: Boolean;
745745
procedure TJsonValue.Parse(JsonString: String);
746746
begin
747747
Clear;
748+
JsonString := Trim(JsonString);
748749
FValueType := AnalyzeJsonValueType(JsonString);
749750
case FValueType of
750751
jvNone: RaiseParseError(JsonString);

0 commit comments

Comments
 (0)