Skip to content

Commit

Permalink
fixed json value parse bug
Browse files Browse the repository at this point in the history
add ```JsonString := Trim(JsonString);``` to TJsonValue.Parse
  • Loading branch information
rilyu authored Dec 22, 2020
1 parent 54a9730 commit afad8e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Jsons.pas
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ function TJsonValue.GetIsNull: Boolean;
procedure TJsonValue.Parse(JsonString: String);
begin
Clear;
JsonString := Trim(JsonString);
FValueType := AnalyzeJsonValueType(JsonString);
case FValueType of
jvNone: RaiseParseError(JsonString);
Expand Down

0 comments on commit afad8e4

Please sign in to comment.