mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 02:19:27 +02:00
* Allow Boolean -> TValue
This commit is contained in:
parent
5887b1fee3
commit
eb08fd88f2
@ -1619,7 +1619,13 @@ end;
|
|||||||
|
|
||||||
function TJSONBool.AsTValue(aTypeInfo: PTypeInfo; var aValue: TValue): Boolean;
|
function TJSONBool.AsTValue(aTypeInfo: PTypeInfo; var aValue: TValue): Boolean;
|
||||||
begin
|
begin
|
||||||
Result:=inherited AsTValue(aTypeInfo, aValue);
|
if aTypeInfo^.Kind=tkBool then
|
||||||
|
begin
|
||||||
|
TValue.Make(@FValue,aTypeInfo,aValue);
|
||||||
|
Result:=True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result:=inherited AsTValue(aTypeInfo, aValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TJSONBool.Create(aValue: Boolean);
|
constructor TJSONBool.Create(aValue: Boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user