fcl-json: fixed UseUTF8=false

git-svn-id: trunk@38257 -
This commit is contained in:
Mattias Gaertner 2018-02-16 19:18:35 +00:00
parent ae3a735e51
commit 232195ee95

View File

@ -67,10 +67,14 @@ procedure DefJSONParserHandler(AStream: TStream; const AUseUTF8: Boolean; out
Var
P : TJSONParser;
AOptions: TJSONOptions;
begin
Data:=Nil;
P:=TJSONParser.Create(AStream,[joUTF8]);
AOptions:=[];
if AUseUTF8 then
Include(AOptions,joUTF8);
P:=TJSONParser.Create(AStream,AOptions);
try
Data:=P.Parse;
finally
@ -146,6 +150,7 @@ end;
procedure TJSONParser.NumberValue(const AValue: TJSONStringType);
begin
// Do nothing
if AValue='' then ;
end;
procedure TJSONParser.IntegerValue(const AValue: integer);