mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 06:08:16 +02:00
fcl-json: fixed UseUTF8=false
git-svn-id: trunk@38257 -
This commit is contained in:
parent
ae3a735e51
commit
232195ee95
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user